BreadthFirstVisitor<R> class

An AST visitor that will recursively visit all of the nodes in an AST structure, similar to GeneralizingAstVisitor. This visitor uses a breadth-first ordering rather than the depth-first ordering of GeneralizingAstVisitor.

Subclasses that override a visit method must either invoke the overridden visit method or explicitly invoke the more general visit method. Failure to do so will cause the visit methods for superclasses of the node to not be invoked and will cause the children of the visited node to not be visited.

In addition, subclasses should not explicitly visit the children of a node, but should ensure that the method visitNode is used to visit the children (either directly or indirectly). Failure to do will break the order in which nodes are visited.

Note that, unlike other visitors that begin to visit a structure of nodes by asking the root node in the structure to accept the visitor, this visitor requires that clients start the visit by invoking the method visitAllNodes defined on the visitor with the root node as the argument:

visitor.visitAllNodes(rootNode);

Clients may extend this class.

Inheritance

Constructors

BreadthFirstVisitor()
Initialize a newly created visitor.

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
visitAdjacentStrings(AdjacentStrings node) → R?
inherited
visitAllNodes(AstNode root) → void
Visit all nodes in the tree starting at the given root node, in breadth-first order.
visitAnnotatedNode(AnnotatedNode node) → R?
inherited
visitAnnotation(Annotation node) → R?
inherited
visitArgumentList(ArgumentList node) → R?
inherited
visitAsExpression(AsExpression node) → R?
inherited
visitAssertInitializer(AssertInitializer node) → R?
inherited
visitAssertStatement(AssertStatement node) → R?
inherited
visitAssignedVariablePattern(AssignedVariablePattern node) → R?
inherited
visitAssignmentExpression(AssignmentExpression node) → R?
inherited
visitAugmentedExpression(AugmentedExpression node) → R?
inherited
visitAugmentedInvocation(AugmentedInvocation node) → R?
inherited
visitAwaitExpression(AwaitExpression node) → R?
inherited
visitBinaryExpression(BinaryExpression node) → R?
inherited
visitBlock(Block node) → R?
inherited
visitBlockFunctionBody(BlockFunctionBody node) → R?
inherited
visitBooleanLiteral(BooleanLiteral node) → R?
inherited
visitBreakStatement(BreakStatement node) → R?
inherited
visitCascadeExpression(CascadeExpression node) → R?
inherited
visitCaseClause(CaseClause node) → R?
inherited
visitCastPattern(CastPattern node) → R?
inherited
visitCatchClause(CatchClause node) → R?
inherited
visitCatchClauseParameter(CatchClauseParameter node) → R?
inherited
visitClassDeclaration(ClassDeclaration node) → R?
inherited
visitClassMember(ClassMember node) → R?
inherited
visitClassTypeAlias(ClassTypeAlias node) → R?
inherited
visitCollectionElement(CollectionElement node) → R?
inherited
visitCombinator(Combinator node) → R?
inherited
visitComment(Comment node) → R?
inherited
visitCommentReference(CommentReference node) → R?
inherited
visitCompilationUnit(CompilationUnit node) → R?
inherited
visitCompilationUnitMember(CompilationUnitMember node) → R?
inherited
visitConditionalExpression(ConditionalExpression node) → R?
inherited
visitConfiguration(Configuration node) → R?
inherited
visitConstantPattern(ConstantPattern node) → R?
inherited
visitConstructorDeclaration(ConstructorDeclaration node) → R?
inherited
visitConstructorFieldInitializer(ConstructorFieldInitializer node) → R?
inherited
visitConstructorInitializer(ConstructorInitializer node) → R?
inherited
visitConstructorName(ConstructorName node) → R?
inherited
visitConstructorReference(ConstructorReference node) → R?
inherited
visitConstructorSelector(ConstructorSelector node) → R?
inherited
visitContinueStatement(ContinueStatement node) → R?
inherited
visitDartPattern(DartPattern node) → R?
inherited
visitDeclaration(Declaration node) → R?
inherited
visitDeclaredIdentifier(DeclaredIdentifier node) → R?
inherited
visitDeclaredVariablePattern(DeclaredVariablePattern node) → R?
inherited
visitDefaultFormalParameter(DefaultFormalParameter node) → R?
inherited
visitDirective(Directive node) → R?
inherited
visitDoStatement(DoStatement node) → R?
inherited
visitDottedName(DottedName node) → R?
inherited
visitDoubleLiteral(DoubleLiteral node) → R?
inherited
visitEmptyFunctionBody(EmptyFunctionBody node) → R?
inherited
visitEmptyStatement(EmptyStatement node) → R?
inherited
visitEnumConstantArguments(EnumConstantArguments node) → R?
inherited
visitEnumConstantDeclaration(EnumConstantDeclaration node) → R?
inherited
visitEnumDeclaration(EnumDeclaration node) → R?
inherited
visitExportDirective(ExportDirective node) → R?
inherited
visitExpression(Expression node) → R?
inherited
visitExpressionFunctionBody(ExpressionFunctionBody node) → R?
inherited
visitExpressionStatement(ExpressionStatement node) → R?
inherited
visitExtendsClause(ExtendsClause node) → R?
inherited
visitExtensionDeclaration(ExtensionDeclaration node) → R?
inherited
visitExtensionOnClause(ExtensionOnClause node) → R?
inherited
visitExtensionOverride(ExtensionOverride node) → R?
inherited
visitExtensionTypeDeclaration(ExtensionTypeDeclaration node) → R?
inherited
visitFieldDeclaration(FieldDeclaration node) → R?
inherited
visitFieldFormalParameter(FieldFormalParameter node) → R?
inherited
visitForEachParts(ForEachParts node) → R?
inherited
visitForEachPartsWithDeclaration(ForEachPartsWithDeclaration node) → R?
inherited
visitForEachPartsWithIdentifier(ForEachPartsWithIdentifier node) → R?
inherited
visitForEachPartsWithPattern(ForEachPartsWithPattern node) → R?
inherited
visitForElement(ForElement node) → R?
inherited
visitFormalParameter(FormalParameter node) → R?
inherited
visitFormalParameterList(FormalParameterList node) → R?
inherited
visitForParts(ForParts node) → R?
inherited
visitForPartsWithDeclarations(ForPartsWithDeclarations node) → R?
inherited
visitForPartsWithExpression(ForPartsWithExpression node) → R?
inherited
visitForPartsWithPattern(ForPartsWithPattern node) → R?
inherited
visitForStatement(ForStatement node) → R?
inherited
visitFunctionBody(FunctionBody node) → R?
inherited
visitFunctionDeclaration(FunctionDeclaration node) → R?
inherited
visitFunctionDeclarationStatement(FunctionDeclarationStatement node) → R?
inherited
visitFunctionExpression(FunctionExpression node) → R?
inherited
visitFunctionExpressionInvocation(FunctionExpressionInvocation node) → R?
inherited
visitFunctionReference(FunctionReference node) → R?
inherited
visitFunctionTypeAlias(FunctionTypeAlias node) → R?
inherited
visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) → R?
inherited
visitGenericFunctionType(GenericFunctionType node) → R?
inherited
visitGenericTypeAlias(GenericTypeAlias node) → R?
inherited
visitGuardedPattern(GuardedPattern node) → R?
inherited
visitHideCombinator(HideCombinator node) → R?
inherited
visitIdentifier(Identifier node) → R?
inherited
visitIfElement(IfElement node) → R?
inherited
visitIfStatement(IfStatement node) → R?
inherited
visitImplementsClause(ImplementsClause node) → R?
inherited
visitImplicitCallReference(ImplicitCallReference node) → R?
inherited
visitImportDirective(ImportDirective node) → R?
inherited
visitImportPrefixReference(ImportPrefixReference node) → R?
inherited
visitIndexExpression(IndexExpression node) → R?
inherited
visitInstanceCreationExpression(InstanceCreationExpression node) → R?
inherited
visitIntegerLiteral(IntegerLiteral node) → R?
inherited
visitInterpolationElement(InterpolationElement node) → R?
inherited
visitInterpolationExpression(InterpolationExpression node) → R?
inherited
visitInterpolationString(InterpolationString node) → R?
inherited
visitInvocationExpression(InvocationExpression node) → R?
inherited
visitIsExpression(IsExpression node) → R?
inherited
visitLabel(Label node) → R?
inherited
visitLabeledStatement(LabeledStatement node) → R?
inherited
visitLibraryDirective(LibraryDirective node) → R?
inherited
visitLibraryIdentifier(LibraryIdentifier node) → R?
inherited
visitListLiteral(ListLiteral node) → R?
inherited
visitListPattern(ListPattern node) → R?
inherited
visitLiteral(Literal node) → R?
inherited
visitLogicalAndPattern(LogicalAndPattern node) → R?
inherited
visitLogicalOrPattern(LogicalOrPattern node) → R?
inherited
visitMapLiteralEntry(MapLiteralEntry node) → R?
inherited
visitMapPattern(MapPattern node) → R?
inherited
visitMapPatternEntry(MapPatternEntry node) → R?
inherited
visitMethodDeclaration(MethodDeclaration node) → R?
inherited
visitMethodInvocation(MethodInvocation node) → R?
inherited
visitMixinDeclaration(MixinDeclaration node) → R?
inherited
visitMixinOnClause(MixinOnClause node) → R?
inherited
visitNamedCompilationUnitMember(NamedCompilationUnitMember node) → R?
inherited
visitNamedExpression(NamedExpression node) → R?
inherited
visitNamedType(NamedType node) → R?
inherited
visitNamespaceDirective(NamespaceDirective node) → R?
inherited
visitNativeClause(NativeClause node) → R?
inherited
visitNativeFunctionBody(NativeFunctionBody node) → R?
inherited
visitNode(AstNode node) → R?
override
visitNormalFormalParameter(NormalFormalParameter node) → R?
inherited
visitNullAssertPattern(NullAssertPattern node) → R?
inherited
visitNullAwareElement(NullAwareElement node) → R?
inherited
visitNullCheckPattern(NullCheckPattern node) → R?
inherited
visitNullLiteral(NullLiteral node) → R?
inherited
visitObjectPattern(ObjectPattern node) → R?
inherited
visitOnClause(OnClause node) → R?
inherited
visitParenthesizedExpression(ParenthesizedExpression node) → R?
inherited
visitParenthesizedPattern(ParenthesizedPattern node) → R?
inherited
visitPartDirective(PartDirective node) → R?
inherited
visitPartOfDirective(PartOfDirective node) → R?
inherited
visitPatternAssignment(PatternAssignment node) → R?
inherited
visitPatternField(PatternField node) → R?
inherited
visitPatternFieldName(PatternFieldName node) → R?
inherited
visitPatternVariableDeclaration(PatternVariableDeclaration node) → R?
inherited
visitPatternVariableDeclarationStatement(PatternVariableDeclarationStatement node) → R?
inherited
visitPostfixExpression(PostfixExpression node) → R?
inherited
visitPrefixedIdentifier(PrefixedIdentifier node) → R?
inherited
visitPrefixExpression(PrefixExpression node) → R?
inherited
visitPropertyAccess(PropertyAccess node) → R?
inherited
visitRecordLiteral(RecordLiteral node) → R?
inherited
visitRecordPattern(RecordPattern node) → R?
inherited
visitRecordTypeAnnotation(RecordTypeAnnotation node) → R?
inherited
visitRecordTypeAnnotationField(RecordTypeAnnotationField node) → R?
inherited
visitRecordTypeAnnotationNamedField(RecordTypeAnnotationNamedField node) → R?
inherited
visitRecordTypeAnnotationNamedFields(RecordTypeAnnotationNamedFields node) → R?
inherited
visitRecordTypeAnnotationPositionalField(RecordTypeAnnotationPositionalField node) → R?
inherited
visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) → R?
inherited
visitRelationalPattern(RelationalPattern node) → R?
inherited
visitRepresentationConstructorName(RepresentationConstructorName node) → R?
inherited
visitRepresentationDeclaration(RepresentationDeclaration node) → R?
inherited
visitRestPatternElement(RestPatternElement node) → R?
inherited
visitRethrowExpression(RethrowExpression node) → R?
inherited
visitReturnStatement(ReturnStatement node) → R?
inherited
visitScriptTag(ScriptTag scriptTag) → R?
inherited
visitSetOrMapLiteral(SetOrMapLiteral node) → R?
inherited
visitShowCombinator(ShowCombinator node) → R?
inherited
visitSimpleFormalParameter(SimpleFormalParameter node) → R?
inherited
visitSimpleIdentifier(SimpleIdentifier node) → R?
inherited
visitSimpleStringLiteral(SimpleStringLiteral node) → R?
inherited
visitSingleStringLiteral(SingleStringLiteral node) → R?
inherited
visitSpreadElement(SpreadElement node) → R?
inherited
visitStatement(Statement node) → R?
inherited
visitStringInterpolation(StringInterpolation node) → R?
inherited
visitStringLiteral(StringLiteral node) → R?
inherited
visitSuperConstructorInvocation(SuperConstructorInvocation node) → R?
inherited
visitSuperExpression(SuperExpression node) → R?
inherited
visitSuperFormalParameter(SuperFormalParameter node) → R?
inherited
visitSwitchCase(SwitchCase node) → R?
inherited
visitSwitchDefault(SwitchDefault node) → R?
inherited
visitSwitchExpression(SwitchExpression node) → R?
inherited
visitSwitchExpressionCase(SwitchExpressionCase node) → R?
inherited
visitSwitchMember(SwitchMember node) → R?
inherited
visitSwitchPatternCase(SwitchPatternCase node) → R?
inherited
visitSwitchStatement(SwitchStatement node) → R?
inherited
visitSymbolLiteral(SymbolLiteral node) → R?
inherited
visitThisExpression(ThisExpression node) → R?
inherited
visitThrowExpression(ThrowExpression node) → R?
inherited
visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) → R?
inherited
visitTryStatement(TryStatement node) → R?
inherited
visitTypeAlias(TypeAlias node) → R?
inherited
visitTypeAnnotation(TypeAnnotation node) → R?
inherited
visitTypeArgumentList(TypeArgumentList node) → R?
inherited
visitTypedLiteral(TypedLiteral node) → R?
inherited
visitTypeLiteral(TypeLiteral node) → R?
inherited
visitTypeParameter(TypeParameter node) → R?
inherited
visitTypeParameterList(TypeParameterList node) → R?
inherited
visitUriBasedDirective(UriBasedDirective node) → R?
inherited
visitVariableDeclaration(VariableDeclaration node) → R?
inherited
visitVariableDeclarationList(VariableDeclarationList node) → R?
inherited
visitVariableDeclarationStatement(VariableDeclarationStatement node) → R?
inherited
visitWhenClause(WhenClause node) → R?
inherited
visitWhileStatement(WhileStatement node) → R?
inherited
visitWildcardPattern(WildcardPattern node) → R?
inherited
visitWithClause(WithClause node) → R?
inherited
visitYieldStatement(YieldStatement node) → R?
inherited

Operators

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