[cfe-dev] new design of RecursiveASTVisitor

Abramo Bagnara abramo.bagnara at gmail.com
Sat Jun 5 00:01:25 PDT 2010


For proper implementation of tree finite automata I'd suggest you to
consider the (needed) distinction from node entering and node exiting.

  call Enter node handler;
  visit node childs;
  call Exit Node handler;

Another very useful thing you should consider is to add a child
identifier to handler arguments that inform handler about *which* parent
child is currently visited: this information is not otherwise deducible.

To better understand this try to imagine an application that want to
check lhs of assign binary operator.



More information about the cfe-dev mailing list