Class ScopeAndDeclarationFinder

  • All Implemented Interfaces:
    AstVisitor<Object,​Object>, PLSQLParserVisitor, PlsqlVisitor<Object,​Object>

    public class ScopeAndDeclarationFinder
    extends PLSQLParserVisitorAdapter
    Visitor for scope creation. Visits all nodes of an AST and creates scope objects for nodes representing syntactic entities which may contain declarations. For example, a block may contain variable definitions (which are declarations) and therefore needs a scope object where these declarations can be associated, whereas an expression can't contain declarations and therefore doesn't need a scope object. With the exception of global scopes, each scope object is linked to its parent scope, which is the scope object of the next embedding syntactic entity that has a scope.