ScopedNameFinder class

Traverse the AST from initial child node to successive parents, building a collection of local variable and parameter names visible to the initial child node. In case of name shadowing, the first name seen is the most specific one so names are not redefined.

Completion test code coverage is 95%. The two basic blocks that are not executed cannot be executed. They are included for future reference.

Inheritance

Constructors

ScopedNameFinder(int _position)

Properties

declaration Declaration
read-only
locals → Map<String, SimpleIdentifier>
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

visitBlock(Block node) → void
override
visitCatchClause(CatchClause node) → void
override
visitConstructorDeclaration(ConstructorDeclaration node) → void
override
visitFieldDeclaration(FieldDeclaration node) → void
override
visitForEachPartsWithDeclaration(ForEachPartsWithDeclaration node) → void
override
visitForPartsWithDeclarations(ForPartsWithDeclarations node) → void
override
visitFunctionDeclaration(FunctionDeclaration node) → void
override
visitFunctionDeclarationStatement(FunctionDeclarationStatement node) → void
override
visitFunctionExpression(FunctionExpression node) → void
override
visitMethodDeclaration(MethodDeclaration node) → void
override
visitNode(AstNode node) → void
override
visitSwitchMember(SwitchMember node) → void
override
visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) → void
override
visitTypeAlias(TypeAlias node) → void
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited
visitAdjacentStrings(AdjacentStrings node) → void
inherited
visitAnnotatedNode(AnnotatedNode node) → void
inherited
visitAnnotation(Annotation node) → void
inherited
visitArgumentList(ArgumentList node) → void
inherited
visitAsExpression(AsExpression node) → void
inherited
visitAssertInitializer(AssertInitializer node) → void
inherited
visitAssertStatement(AssertStatement node) → void
inherited
visitAssignmentExpression(AssignmentExpression node) → void
inherited
visitAwaitExpression(AwaitExpression node) → void
inherited
visitBinaryExpression(BinaryExpression node) → void
inherited
visitBlockFunctionBody(BlockFunctionBody node) → void
inherited
visitBooleanLiteral(BooleanLiteral node) → void
inherited
visitBreakStatement(BreakStatement node) → void
inherited
visitCascadeExpression(CascadeExpression node) → void
inherited
visitClassDeclaration(ClassDeclaration node) → void
inherited
visitClassMember(ClassMember node) → void
inherited
visitClassTypeAlias(ClassTypeAlias node) → void
inherited
visitCollectionElement(CollectionElement node) → void
inherited
visitCombinator(Combinator node) → void
inherited
visitComment(Comment node) → void
inherited
visitCommentReference(CommentReference node) → void
inherited
visitCompilationUnit(CompilationUnit node) → void
inherited
visitCompilationUnitMember(CompilationUnitMember node) → void
inherited
visitConditionalExpression(ConditionalExpression node) → void
inherited
visitConfiguration(Configuration node) → void
inherited
visitConstructorFieldInitializer(ConstructorFieldInitializer node) → void
inherited
visitConstructorInitializer(ConstructorInitializer node) → void
inherited
visitConstructorName(ConstructorName node) → void
inherited
visitContinueStatement(ContinueStatement node) → void
inherited
visitDeclaration(Declaration node) → void
inherited
visitDeclaredIdentifier(DeclaredIdentifier node) → void
inherited
visitDefaultFormalParameter(DefaultFormalParameter node) → void
inherited
visitDirective(Directive node) → void
inherited
visitDoStatement(DoStatement node) → void
inherited
visitDottedName(DottedName node) → void
inherited
visitDoubleLiteral(DoubleLiteral node) → void
inherited
visitEmptyFunctionBody(EmptyFunctionBody node) → void
inherited
visitEmptyStatement(EmptyStatement node) → void
inherited
visitEnumConstantDeclaration(EnumConstantDeclaration node) → void
inherited
visitEnumDeclaration(EnumDeclaration node) → void
inherited
visitExportDirective(ExportDirective node) → void
inherited
visitExpression(Expression node) → void
inherited
visitExpressionFunctionBody(ExpressionFunctionBody node) → void
inherited
visitExpressionStatement(ExpressionStatement node) → void
inherited
visitExtendsClause(ExtendsClause node) → void
inherited
visitExtensionDeclaration(ExtensionDeclaration node) → void
inherited
visitExtensionOverride(ExtensionOverride node) → void
inherited
visitFieldFormalParameter(FieldFormalParameter node) → void
inherited
visitForEachParts(ForEachParts node) → void
inherited
visitForEachPartsWithIdentifier(ForEachPartsWithIdentifier node) → void
inherited
visitForElement(ForElement node) → void
inherited
visitFormalParameter(FormalParameter node) → void
inherited
visitFormalParameterList(FormalParameterList node) → void
inherited
visitForParts(ForParts node) → void
inherited
visitForPartsWithExpression(ForPartsWithExpression node) → void
inherited
visitForStatement(ForStatement node) → void
inherited
visitFunctionBody(FunctionBody node) → void
inherited
visitFunctionExpressionInvocation(FunctionExpressionInvocation node) → void
inherited
visitFunctionTypeAlias(FunctionTypeAlias node) → void
inherited
visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) → void
inherited
visitGenericFunctionType(GenericFunctionType node) → void
inherited
visitGenericTypeAlias(GenericTypeAlias node) → void
inherited
visitHideCombinator(HideCombinator node) → void
inherited
visitIdentifier(Identifier node) → void
inherited
visitIfElement(IfElement node) → void
inherited
visitIfStatement(IfStatement node) → void
inherited
visitImplementsClause(ImplementsClause node) → void
inherited
visitImportDirective(ImportDirective node) → void
inherited
visitIndexExpression(IndexExpression node) → void
inherited
visitInstanceCreationExpression(InstanceCreationExpression node) → void
inherited
visitIntegerLiteral(IntegerLiteral node) → void
inherited
visitInterpolationElement(InterpolationElement node) → void
inherited
visitInterpolationExpression(InterpolationExpression node) → void
inherited
visitInterpolationString(InterpolationString node) → void
inherited
visitInvocationExpression(InvocationExpression node) → void
inherited
visitIsExpression(IsExpression node) → void
inherited
visitLabel(Label node) → void
inherited
visitLabeledStatement(LabeledStatement node) → void
inherited
visitLibraryDirective(LibraryDirective node) → void
inherited
visitLibraryIdentifier(LibraryIdentifier node) → void
inherited
visitListLiteral(ListLiteral node) → void
inherited
visitLiteral(Literal node) → void
inherited
visitMapLiteralEntry(MapLiteralEntry node) → void
inherited
visitMethodInvocation(MethodInvocation node) → void
inherited
visitMixinDeclaration(MixinDeclaration node) → void
inherited
visitNamedCompilationUnitMember(NamedCompilationUnitMember node) → void
inherited
visitNamedExpression(NamedExpression node) → void
inherited
visitNamespaceDirective(NamespaceDirective node) → void
inherited
visitNativeClause(NativeClause node) → void
inherited
visitNativeFunctionBody(NativeFunctionBody node) → void
inherited
visitNormalFormalParameter(NormalFormalParameter node) → void
inherited
visitNullLiteral(NullLiteral node) → void
inherited
visitOnClause(OnClause node) → void
inherited
visitParenthesizedExpression(ParenthesizedExpression node) → void
inherited
visitPartDirective(PartDirective node) → void
inherited
visitPartOfDirective(PartOfDirective node) → void
inherited
visitPostfixExpression(PostfixExpression node) → void
inherited
visitPrefixedIdentifier(PrefixedIdentifier node) → void
inherited
visitPrefixExpression(PrefixExpression node) → void
inherited
visitPropertyAccess(PropertyAccess node) → void
inherited
visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) → void
inherited
visitRethrowExpression(RethrowExpression node) → void
inherited
visitReturnStatement(ReturnStatement node) → void
inherited
visitScriptTag(ScriptTag scriptTag) → void
inherited
visitSetOrMapLiteral(SetOrMapLiteral node) → void
inherited
visitShowCombinator(ShowCombinator node) → void
inherited
visitSimpleFormalParameter(SimpleFormalParameter node) → void
inherited
visitSimpleIdentifier(SimpleIdentifier node) → void
inherited
visitSimpleStringLiteral(SimpleStringLiteral node) → void
inherited
visitSingleStringLiteral(SingleStringLiteral node) → void
inherited
visitSpreadElement(SpreadElement node) → void
inherited
visitStatement(Statement node) → void
inherited
visitStringInterpolation(StringInterpolation node) → void
inherited
visitStringLiteral(StringLiteral node) → void
inherited
visitSuperConstructorInvocation(SuperConstructorInvocation node) → void
inherited
visitSuperExpression(SuperExpression node) → void
inherited
visitSwitchCase(SwitchCase node) → void
inherited
visitSwitchDefault(SwitchDefault node) → void
inherited
visitSwitchStatement(SwitchStatement node) → void
inherited
visitSymbolLiteral(SymbolLiteral node) → void
inherited
visitThisExpression(ThisExpression node) → void
inherited
visitThrowExpression(ThrowExpression node) → void
inherited
visitTryStatement(TryStatement node) → void
inherited
visitTypeAnnotation(TypeAnnotation node) → void
inherited
visitTypeArgumentList(TypeArgumentList node) → void
inherited
visitTypedLiteral(TypedLiteral node) → void
inherited
visitTypeName(TypeName node) → void
inherited
visitTypeParameter(TypeParameter node) → void
inherited
visitTypeParameterList(TypeParameterList node) → void
inherited
visitUriBasedDirective(UriBasedDirective node) → void
inherited
visitVariableDeclaration(VariableDeclaration node) → void
inherited
visitVariableDeclarationList(VariableDeclarationList node) → void
inherited
visitVariableDeclarationStatement(VariableDeclarationStatement node) → void
inherited
visitWhileStatement(WhileStatement node) → void
inherited
visitWithClause(WithClause node) → void
inherited
visitYieldStatement(YieldStatement node) → void
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited