Part 2: AST traversal