Class ScopedParserState

java.lang.Object
org.jruby.parser.ScopedParserState

public class ScopedParserState extends Object
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 Details

    • ScopedParserState

      public ScopedParserState(ScopedParserState enclosingScope)
    • 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

      public ScopedParserState getEnclosingScope()
    • growNamedCaptures

      public void growNamedCaptures(int index)
    • hasDefinedVariables

      public boolean hasDefinedVariables()
    • isNamedCapture

      public boolean isNamedCapture(int index)
    • addDefinedVariable

      public void addDefinedVariable(RubySymbol name, int line)
    • markUsedVariable

      public void markUsedVariable(RubySymbol name, int depth)
    • warnUnusedVariables

      public void warnUnusedVariables(RubyParserBase parser, String file)