|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.parser.StaticScope
Constructor Summary | |
protected |
StaticScope(StaticScope enclosingScope)
|
protected |
StaticScope(StaticScope enclosingScope,
java.lang.String[] names)
|
Method Summary | |
int |
addVariable(java.lang.String name)
|
AssignableNode |
assign(ISourcePosition position,
java.lang.String name,
Node value)
Make a DASgn or LocalAsgn node based on scope logic |
protected abstract AssignableNode |
assign(ISourcePosition position,
java.lang.String name,
Node value,
StaticScope topScope,
int depth)
|
Node |
declare(ISourcePosition position,
java.lang.String name)
Make a DVar or LocalVar node based on scoping logic |
protected abstract Node |
declare(ISourcePosition position,
java.lang.String name,
int depth)
|
int |
exists(java.lang.String name)
Does the variable exist? |
abstract java.lang.String[] |
getAllNamesInScope(DynamicScope dynamicScope)
Get all visible variables that we can see from this scope that have been assigned (e.g. |
StaticScope |
getEnclosingScope()
Next outer most scope in list of scopes. |
abstract StaticScope |
getLocalScope()
Gets the Local Scope relative to the current Scope. |
int |
getNumberOfVariables()
|
java.lang.String[] |
getVariables()
|
int |
isDefined(java.lang.String name)
Is this name in the visible to the current scope |
protected abstract int |
isDefined(java.lang.String name,
int depth)
|
void |
setVariables(java.lang.String[] names)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected StaticScope(StaticScope enclosingScope)
protected StaticScope(StaticScope enclosingScope, java.lang.String[] names)
Method Detail |
public int addVariable(java.lang.String name)
public java.lang.String[] getVariables()
public int getNumberOfVariables()
public void setVariables(java.lang.String[] names)
public StaticScope getEnclosingScope()
public int exists(java.lang.String name)
name
- of the variable to find
public int isDefined(java.lang.String name)
name
- to be looked for
public AssignableNode assign(ISourcePosition position, java.lang.String name, Node value)
position
- name
- value
-
public abstract java.lang.String[] getAllNamesInScope(DynamicScope dynamicScope)
protected abstract int isDefined(java.lang.String name, int depth)
protected abstract AssignableNode assign(ISourcePosition position, java.lang.String name, Node value, StaticScope topScope, int depth)
protected abstract Node declare(ISourcePosition position, java.lang.String name, int depth)
public Node declare(ISourcePosition position, java.lang.String name)
position
- the location that in the source that the new node will come fromname
- of the variable to be created is named
public abstract StaticScope getLocalScope()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |