how to match AST nodes in order

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to match AST nodes in order

Kristóf Umann via cfe-dev
Hello,

I have been looking for a way to give traverse nodes in DFS using ast matchers and libtooling. For example I have a below AST -

-BinaryOperator-
   -BinaryOperator-
      -IntegerLiteral
  -IntegerLiteral
 -IntegerLiteral

Before matching above binaryOperator Node, I want to match the inner binaryOperator node. Depth could be any, I want to handle innermost node first. Is there any way to achieve this using clang ast matchers and libtooling. 


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev