use of net.sourceforge.pmd.lang.symboltable.Scope in project pmd by pmd.
the class ScopeAndDeclarationFinder method visit.
@Override
public Object visit(ASTPackageSpecification node, Object data) {
createClassScope(node);
Scope s = ((PLSQLNode) node.jjtGetParent()).getScope();
s.addDeclaration(new ClassNameDeclaration(node));
cont(node);
return data;
}
use of net.sourceforge.pmd.lang.symboltable.Scope in project pmd by pmd.
the class ScopeAndDeclarationFinder method visit.
@Override
public Object visit(ASTTriggerUnit node, Object data) {
createClassScope(node);
Scope s = ((PLSQLNode) node.jjtGetParent()).getScope();
s.addDeclaration(new ClassNameDeclaration(node));
cont(node);
return data;
}
use of net.sourceforge.pmd.lang.symboltable.Scope in project pmd by pmd.
the class ScopeAndDeclarationFinder method visit.
@Override
public Object visit(ASTTypeSpecification node, Object data) {
createClassScope(node);
Scope s = ((PLSQLNode) node.jjtGetParent()).getScope();
s.addDeclaration(new ClassNameDeclaration(node));
cont(node);
return data;
}
use of net.sourceforge.pmd.lang.symboltable.Scope 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);
}
Aggregations