Simplified an AST iterator