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 TypeMethodDescriptionvoidaddDefinedVariable(RubySymbol name, int line) longlongvoidgrowNamedCaptures(int index) booleanbooleanisNamedCapture(int index) voidmarkUsedVariable(RubySymbol name, int depth) voidsetCommandArgumentStack(long commandArgumentStack) voidsetCondArgumentStack(long condArgumentStack) voidwarnUnusedVariables(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
-