[rust-compiler] Refactor function discovery to use AstWalker visitor
Replaced ~330 lines of hand-written recursive AST traversal with the existing AstWalker + Visitor infrastructure from react_compiler_ast. Extended the Visitor trait with: - 'ast lifetime parameter for storing AST references - traverse_function_bodies() to skip function body recursion - enter/leave_variable_declarator for name inference - enter/leave_call_expression for forwardRef/memo detection - enter/leave_loop_expression for Babel-compatible scope checks Created FunctionDiscoveryVisitor that replaces find_functions_to_compile, visit_statement_for_functions, and find_nested_functions_in_expr with a single visitor implementation driven by AstWalker::walk_program.
J
Joe Savona committed
ba3ae495d33923e549f15e62d0cf2e835add777e
Parent: 8178b8d