Package gw.lang.parser
Interface IScope<K,V extends ISymbol>
-
- All Superinterfaces:
Map<K,V>
- All Known Implementing Classes:
CommonSymbolsScope
,StandardScope
public interface IScope<K,V extends ISymbol> extends Map<K,V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IScope<K,V>
copy()
Shallow copy this scopeint
countSymbols()
visit all symbols in this Scope,IActivationContext
getActivationCtx()
Get the activation record context.int
getCSR()
V
put(K key, V value)
void
setCSR(int csr)
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
getActivationCtx
IActivationContext getActivationCtx()
Get the activation record context. This can be any object representing the activation record e.g., a function symbol, a rule set context, whatever delimits a call boundary.- Returns:
- The activation context.
-
countSymbols
int countSymbols()
visit all symbols in this Scope,- Returns:
- true if the visitor want to continue visitiong other symbol/scope, false otherwise.
-
getCSR
int getCSR()
- Returns:
- the compile-time csr for this scope if it exists
-
setCSR
void setCSR(int csr)
-
-