public class SymbolDeclarationVisitor extends BaseTreeVisitor
| Constructor and Description |
|---|
SymbolDeclarationVisitor(SymbolModelBuilder symbolModel) |
| Modifier and Type | Method and Description |
|---|---|
void |
addUsages(VariableDeclarationTree tree) |
void |
visitAccessorMethodDeclaration(AccessorMethodDeclarationTree tree) |
void |
visitArrowFunction(ArrowFunctionTree tree) |
void |
visitCatchBlock(CatchBlockTree tree) |
void |
visitFunctionDeclaration(FunctionDeclarationTree tree) |
void |
visitFunctionExpression(FunctionExpressionTree tree)
Detail about Function Expression scope
The BindingIdentifier in a FunctionExpression can be referenced from inside the FunctionExpression's FunctionBody
to allow the function to call itself recursively.
|
void |
visitGeneratorMethodDeclaration(GeneratorMethodDeclarationTree tree) |
void |
visitMethodDeclaration(MethodDeclarationTree tree) |
void |
visitScript(ScriptTree tree) |
void |
visitVariableDeclaration(VariableDeclarationTree tree) |
getContext, scan, scan, scanFile, visitArrayBindingPattern, visitArrayLiteral, visitAssignmentExpression, visitBinaryExpression, visitBindingProperty, visitBlock, visitBreakStatement, visitCallExpression, visitCaseClause, visitClassDeclaration, visitComputedPropertyName, visitConditionalExpression, visitContinueStatement, visitDebugger, visitDefaultClause, visitDefaultExportDeclaration, visitDoWhileStatement, visitElseClause, visitEmptyStatement, visitExportClause, visitExpressionStatement, visitForInStatement, visitForOfStatement, visitForStatement, visitFromClause, visitIdentifier, visitIfStatement, visitImportClause, visitImportDeclaration, visitImportModuleDeclaration, visitInitializedBindingElement, visitLabelledStatement, visitLiteral, visitMemberExpression, visitModule, visitNamedExportDeclaration, visitNameSpaceExportDeclaration, visitNewExpression, visitObjectBindingPattern, visitObjectLiteral, visitPairProperty, visitParameterList, visitParenthesisedExpression, visitRestElement, visitReturnStatement, visitSpecifier, visitSpecifierList, visitSuper, visitSwitchStatement, visitTaggedTemplate, visitTemplateCharacters, visitTemplateExpression, visitTemplateLiteral, visitThisTree, visitThrowStatement, visitTryStatement, visitUnaryExpression, visitVariableStatement, visitWhileStatement, visitWithStatement, visitYieldExpressionpublic SymbolDeclarationVisitor(SymbolModelBuilder symbolModel)
public void visitScript(ScriptTree tree)
visitScript in interface TreeVisitorvisitScript in class BaseTreeVisitorpublic void visitMethodDeclaration(MethodDeclarationTree tree)
visitMethodDeclaration in interface TreeVisitorvisitMethodDeclaration in class BaseTreeVisitorpublic void visitAccessorMethodDeclaration(AccessorMethodDeclarationTree tree)
visitAccessorMethodDeclaration in interface TreeVisitorvisitAccessorMethodDeclaration in class BaseTreeVisitorpublic void visitGeneratorMethodDeclaration(GeneratorMethodDeclarationTree tree)
visitGeneratorMethodDeclaration in interface TreeVisitorvisitGeneratorMethodDeclaration in class BaseTreeVisitorpublic void visitCatchBlock(CatchBlockTree tree)
visitCatchBlock in interface TreeVisitorvisitCatchBlock in class BaseTreeVisitorpublic void visitFunctionDeclaration(FunctionDeclarationTree tree)
visitFunctionDeclaration in interface TreeVisitorvisitFunctionDeclaration in class BaseTreeVisitorpublic void visitArrowFunction(ArrowFunctionTree tree)
visitArrowFunction in interface TreeVisitorvisitArrowFunction in class BaseTreeVisitorpublic void visitFunctionExpression(FunctionExpressionTree tree)
The BindingIdentifier in a FunctionExpression can be referenced from inside the FunctionExpression's FunctionBody to allow the function to call itself recursively. However, unlike in a FunctionDeclaration, the BindingIdentifier in a FunctionExpression cannot be referenced from and does not affect the scope enclosing the FunctionExpression.
visitFunctionExpression in interface TreeVisitorvisitFunctionExpression in class BaseTreeVisitorpublic void visitVariableDeclaration(VariableDeclarationTree tree)
visitVariableDeclaration in interface TreeVisitorvisitVariableDeclaration in class BaseTreeVisitorpublic void addUsages(VariableDeclarationTree tree)
Copyright © 2011–2015 SonarSource and Eriks Nukis. All rights reserved.