Package com.schibsted.spt.data.jslt.impl
Class ScopeManager.ScopeFrame
- java.lang.Object
-
- com.schibsted.spt.data.jslt.impl.ScopeManager.ScopeFrame
-
- Enclosing class:
- ScopeManager
private static class ScopeManager.ScopeFrame extends java.lang.Object
A scope frame is smaller than a stack frame: each object, object comprehension, for expression, and if expression will have its own scope frame. These need to be handled separately because of the shadowing of variables.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
inFunction
private ScopeManager.StackFrame
parent
private java.util.Map<java.lang.String,VariableInfo>
variables
-
Constructor Summary
Constructors Constructor Description ScopeFrame(boolean inFunction, ScopeManager.StackFrame parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
registerVariable(VariableInfo variable)
VariableInfo
resolveVariable(java.lang.String name)
-
-
-
Field Detail
-
inFunction
private boolean inFunction
-
parent
private ScopeManager.StackFrame parent
-
variables
private java.util.Map<java.lang.String,VariableInfo> variables
-
-
Constructor Detail
-
ScopeFrame
public ScopeFrame(boolean inFunction, ScopeManager.StackFrame parent)
-
-
Method Detail
-
registerVariable
public int registerVariable(VariableInfo variable)
-
resolveVariable
public VariableInfo resolveVariable(java.lang.String name)
-
-