org.jrubyparser
Class BlockStaticScope
java.lang.Object
org.jrubyparser.StaticScope
org.jrubyparser.BlockStaticScope
- All Implemented Interfaces:
- Serializable
public class BlockStaticScope
- extends StaticScope
- See Also:
- Serialized Form
| Methods inherited from class org.jrubyparser.StaticScope |
addVariable, addVariableThisScope, assign, capture, declare, exists, getEnclosingScope, getNumberOfVariables, getPreviousCRefScope, getVariables, isArgumentScope, isCaptured, isDefined, setArgumentScope, setVariables |
BlockStaticScope
public BlockStaticScope(StaticScope parentScope)
BlockStaticScope
public BlockStaticScope(StaticScope parentScope,
String[] names)
getLocalScope
public StaticScope getLocalScope()
- Description copied from class:
StaticScope
- Gets the Local Scope relative to the current Scope. For LocalScopes this will be itself.
Blocks will contain the LocalScope it contains.
- Specified by:
getLocalScope in class StaticScope
- Returns:
- localScope
isDefined
public int isDefined(String name,
int depth)
- Specified by:
isDefined in class StaticScope
getAllNamesInScope
public String[] getAllNamesInScope()
- Description copied from class:
StaticScope
- Get all visible variables that we can see from this scope that have been assigned
(e.g. seen so far)
- Specified by:
getAllNamesInScope in class StaticScope
- Returns:
- a list of all names (sans $~ and $_ which are special names)
- See Also:
org.jruby.parser.StaticScope#getAllNamesInScope()
assign
protected AssignableNode assign(SourcePosition position,
String name,
Node value,
StaticScope topScope,
int depth)
- Specified by:
assign in class StaticScope
addAssign
public AssignableNode addAssign(SourcePosition position,
String name,
Node value)
declare
public Node declare(SourcePosition position,
String name,
int depth)
- Specified by:
declare in class StaticScope
toString
public String toString()
- Overrides:
toString in class StaticScope
Copyright © 2013. All Rights Reserved.