Simple but flexible lexically ordered AST traversal with pre and post visitors