RecursiveVisitor<T> class

Traverses the entire subtree when visiting a node.

When overriding a visitXXX method, it is your responsibility to visit the children of the given node, otherwise that subtree will not be traversed.

For example:

visitWhile(While node) {
    print('Found while loop on line ${node.line}');
    node.forEach(visit); // visit children
}

Without the call to forEach, a while loop nested in another while loop would not be found.

Inheritance
Implementers

Constructors

RecursiveVisitor()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

defaultNode(Node node) → T?
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
visit(Node node) → T?
Shorthand for node.visitBy(this).
inherited
visitArray(ArrayExpression node) → T?
inherited
visitAssignment(AssignmentExpression node) → T?
inherited
visitBinary(BinaryExpression node) → T?
inherited
visitBlock(BlockStatement node) → T?
inherited
visitBreak(BreakStatement node) → T?
inherited
visitCall(CallExpression node) → T?
inherited
visitCatchClause(CatchClause node) → T?
inherited
visitConditional(ConditionalExpression node) → T?
inherited
visitContinue(ContinueStatement node) → T?
inherited
visitDebugger(DebuggerStatement node) → T?
inherited
visitDoWhile(DoWhileStatement node) → T?
inherited
visitEmptyStatement(EmptyStatement node) → T?
inherited
visitExpressionStatement(ExpressionStatement node) → T?
inherited
visitFor(ForStatement node) → T?
inherited
visitForIn(ForInStatement node) → T?
inherited
visitForOf(ForOfStatement node) → T?
inherited
visitFunctionDeclaration(FunctionDeclaration node) → T?
inherited
visitFunctionExpression(FunctionExpression node) → T?
inherited
visitFunctionNode(FunctionNode node) → T?
inherited
visitIf(IfStatement node) → T?
inherited
visitIndex(IndexExpression node) → T?
inherited
visitLabeledStatement(LabeledStatement node) → T?
inherited
visitLiteral(LiteralExpression node) → T?
inherited
visitMember(MemberExpression node) → T?
inherited
visitName(Name node) → T?
inherited
visitNameExpression(NameExpression node) → T?
inherited
visitObject(ObjectExpression node) → T?
inherited
visitProgram(Program node) → T?
inherited
visitPrograms(Programs node) → T?
inherited
visitProperty(Property node) → T?
inherited
visitRegexp(RegexpExpression node) → T?
inherited
visitReturn(ReturnStatement node) → T?
inherited
visitSequence(SequenceExpression node) → T?
inherited
visitSpread(SpreadExpression node) → T?
inherited
visitSpreadElement(SpreadElement node) → T?
inherited
visitSwitch(SwitchStatement node) → T?
inherited
visitSwitchCase(SwitchCase node) → T?
inherited
visitThis(ThisExpression node) → T?
inherited
visitThrow(ThrowStatement node) → T?
inherited
visitTry(TryStatement node) → T?
inherited
visitUnary(UnaryExpression node) → T?
inherited
visitUpdateExpression(UpdateExpression node) → T?
inherited
visitVariableDeclaration(VariableDeclaration node) → T?
inherited
visitVariableDeclarator(VariableDeclarator node) → T?
inherited
visitWhile(WhileStatement node) → T?
inherited
visitWith(WithStatement node) → T?
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited