Search in sources :

Example 1 with ASTObjectDeclaration

use of net.sourceforge.pmd.lang.plsql.ast.ASTObjectDeclaration in project pmd by pmd.

the class ScopeAndDeclarationFinder method createSourceFileScope.

/**
 * Creates a new global scope for an AST node. The new scope is stored on
 * the scope stack.
 *
 * @param node
 *            the AST node for which the scope has to be created.
 */
private void createSourceFileScope(ASTInput node) {
    // When we do full symbol resolution, we'll need to add a truly
    // top-level GlobalScope.
    Scope scope;
    // %TODO generate a SchemaScope, based on inferred or explcitly
    // specified SchemaName
    // node.getPackageDeclaration();
    ASTObjectDeclaration n = null;
    if (n != null) {
        scope = new SourceFileScope(n.jjtGetChild(0).getImage());
    } else {
        scope = new SourceFileScope();
    }
    scopes.push(scope);
    node.setScope(scope);
}
Also used : ASTObjectDeclaration(net.sourceforge.pmd.lang.plsql.ast.ASTObjectDeclaration) Scope(net.sourceforge.pmd.lang.symboltable.Scope)

Aggregations

ASTObjectDeclaration (net.sourceforge.pmd.lang.plsql.ast.ASTObjectDeclaration)1 Scope (net.sourceforge.pmd.lang.symboltable.Scope)1