Expand description
Read-only AST traversal.
Structs§
- Scope
- Lexical scope context passed to each
ScopeVisitormethod. - Scope
Walker - Drives a
ScopeVisitorover an AST, maintainingScopeautomatically.
Traits§
- Scope
Visitor - A scope-aware variant of
Visitor. - Visitor
- Visitor trait for immutable AST traversal.
Functions§
- walk_
arg - Visits the value expression of a call argument, skipping PHP 8.6 placeholders.
- walk_
attribute - Visits an attribute’s name and argument expressions.
- walk_
block - Visits each statement in a block.
- 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_
comments - Calls
Visitor::visit_commentfor each comment incomments. - walk_
enum_ member - Dispatches an enum member (case, method, constant, or trait use) to its child visitors.
- walk_
expr - Dispatches
exprto the appropriate child visitors based on itsExprKind. - walk_
match_ arm - Visits a match arm’s condition expressions (if any) and body expression.
- walk_
name - Calls
Visitor::visit_nameonname. - walk_
param - Visits a function/method parameter’s attributes, type hint, default expression, and property hooks.
- walk_
program - Visits every top-level statement in
programby callingVisitor::visit_stmt. - walk_
property_ hook - Visits a property hook’s attributes, parameters, and body statements or expression.
- walk_
stmt - Dispatches
stmtto the appropriate child visitors based on itsStmtKind. - 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).