1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

Start of Scope2 and cleaned up ASTNode a little.

This commit is contained in:
Doug Schaefer 2005-11-11 03:21:43 +00:00
parent 4108c84536
commit d11105a29b
2 changed files with 16 additions and 10 deletions

View file

@ -16,4 +16,6 @@ package org.eclipse.cdt.core.dom.ast;
*/
public interface IScope2 {
public IBinding getBinding(IASTName name);
}

View file

@ -35,21 +35,25 @@ public class CASTName extends CASTNode implements IASTName {
this.name = name;
}
/**
*
*/
public CASTName() {
name = EMPTY_CHAR_ARRAY;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.cdt.core.dom.ast.IASTName#resolveBinding()
*/
private static boolean inited = false;
private static boolean useScope2 = false;
public IBinding resolveBinding() {
if (binding == null)
CVisitor.createBinding(this);
if (binding == null) {
if (!inited) {
useScope2 = System.getProperty("doug.useScope2") != null ? true : false;
inited = true;
}
if (useScope2)
binding = getScope(this, getPropertyInParent()).getBinding(this);
else
CVisitor.createBinding(this);
}
return binding;
}