use of org.eclipse.ceylon.compiler.typechecker.analyzer.LocalDeclarationVisitor in project ceylon by eclipse.
the class PhasedUnit method scanDeclarations.
public void scanDeclarations() {
Boolean enabled = TypeCache.setEnabled(false);
try {
if (!declarationsScanned) {
processLiterals();
scanningDeclarations = true;
// System.out.println("Scan declarations for " + fileName);
DeclarationVisitor dv = new DeclarationVisitor(unit) {
@Override
protected boolean shouldIgnoreOverload(Declaration overload, Declaration declaration) {
return PhasedUnit.this.shouldIgnoreOverload(overload, declaration);
}
@Override
protected boolean isAllowedToChangeModel(Declaration declaration) {
return PhasedUnit.this.isAllowedToChangeModel(declaration);
}
};
rootNode.visit(dv.setExceptionHandler(this));
rootNode.visit(new LocalDeclarationVisitor().setExceptionHandler(this));
declarationsScanned = true;
scanningDeclarations = false;
}
} finally {
TypeCache.setEnabled(enabled);
}
}
Aggregations