Package org.jruby.parser
Class ScopedParserState
java.lang.Object
org.jruby.parser.ScopedParserState
Each scope while parsing contains extra information as part of the parsing process.
This class holds this instead of StaticScope which will outlive parsing.
-
Constructor Summary
ConstructorsConstructorDescriptionScopedParserState
(ScopedParserState enclosingScope) ScopedParserState
(ScopedParserState enclosingScope, long commandArgumentStack, long condArgumentStack) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDefinedVariable
(RubySymbol name, int line) long
long
void
growNamedCaptures
(int index) boolean
boolean
isNamedCapture
(int index) void
markUsedVariable
(RubySymbol name, int depth) void
setCommandArgumentStack
(long commandArgumentStack) void
setCondArgumentStack
(long condArgumentStack) void
warnUnusedVariables
(RubyParserBase parser, String file)
-
Constructor Details
-
ScopedParserState
-
ScopedParserState
public ScopedParserState(ScopedParserState enclosingScope, long commandArgumentStack, long condArgumentStack)
-
-
Method Details
-
setCondArgumentStack
public void setCondArgumentStack(long condArgumentStack) -
getCondArgumentStack
public long getCondArgumentStack() -
setCommandArgumentStack
public void setCommandArgumentStack(long commandArgumentStack) -
getCommandArgumentStack
public long getCommandArgumentStack() -
getEnclosingScope
-
growNamedCaptures
public void growNamedCaptures(int index) -
hasDefinedVariables
public boolean hasDefinedVariables() -
isNamedCapture
public boolean isNamedCapture(int index) -
addDefinedVariable
-
markUsedVariable
-
warnUnusedVariables
-