Skip to main content

Module visitor

Module visitor 

Source

Structs§

Scope
Lexical scope context passed to each ScopeVisitor method.
ScopeWalker
Drives a ScopeVisitor over an AST, maintaining Scope automatically.

Traits§

ScopeVisitor
A scope-aware variant of Visitor.
Visitor
Visitor trait for immutable AST traversal.

Functions§

walk_arg
Visits the value expression of a call argument.
walk_attribute
Visits an attribute’s name and argument expressions.
walk_catch_clause
Visits a catch clause’s caught type names and body statements.
walk_class_member
Dispatches a class member (property, method, constant, or trait use) to its child visitors.
walk_enum_member
Dispatches an enum member (case, method, constant, or trait use) to its child visitors.
walk_expr
Dispatches expr to the appropriate child visitors based on its ExprKind.
walk_match_arm
Visits a match arm’s condition expressions (if any) and body expression.
walk_name
Calls Visitor::visit_name on name.
walk_param
Visits a function/method parameter’s attributes, type hint, default expression, and property hooks.
walk_program
Visits every top-level statement in program by calling Visitor::visit_stmt.
walk_property_hook
Visits a property hook’s attributes, parameters, and body statements or expression.
walk_stmt
Dispatches stmt to the appropriate child visitors based on its StmtKind.
walk_trait_use
Visits a trait use declaration’s trait names and adaptations (insteadof, as).
walk_type_hint
Visits the inner types of a type hint (recursing into nullable, union, and intersection).