- All Superinterfaces:
- ILLKScope
- All Known Implementing Classes:
- ScopeStack
- public interface IScopeStack
- extends ILLKScope
Scope stack is used by the parser to keep track of the current
lexical scopes and performs symbol lookups.
. Scope stack from bottom to top:
rootNode scope
compilationUnit scope
topLevelClass scope
class/block/method...etc. scopes
...
. When a variable is encountered in the statement, its type is
determined by searching the scopes from the top of the scope stack
downwards until it found the variable declaration/definition. If
a scope belongs to a classs (parent!=null), ASTClassNode would
search the superclasses and interfaces.
| Methods inherited from interface com.port80.eclipse.csharp.llk.ast.ILLKScope |
dumpScope, getMethod, getName, getType, getVar, keySet, putMethod, putSymbol, putSymbolList, putType, putVar |
empty
public boolean empty()
push
public void push(java.lang.Object o)
pop
public ILLKScope pop()
peek
public ILLKScope peek()
size
public int size()
get
public ILLKScope get(int i)
getRootContext
public com.port80.eclipse.csharp.llk.parser.ASTRootContext getRootContext()
getCompilationUnit
public com.port80.eclipse.csharp.llk.parser.ASTCompilationUnit getCompilationUnit()
isClassScope
public boolean isClassScope()
getClassLevel
public int getClassLevel()
getCurrentClass
public Type getCurrentClass()
getTopLevelClass
public Type getTopLevelClass()
getSimpleType
public ISymbol getSimpleType(java.lang.String aname)
findClass
public Type findClass(java.lang.String name)
loadClass
public Type loadClass(java.lang.String name)