Class ParserConfiguration

java.lang.Object
org.jruby.parser.ParserConfiguration

public class ParserConfiguration extends Object
  • Constructor Details

    • ParserConfiguration

      public ParserConfiguration(Ruby runtime, int lineNumber, boolean inlineSource, boolean isFileParse, boolean saveData)
    • ParserConfiguration

      @Deprecated public ParserConfiguration(Ruby runtime, int lineNumber, boolean inlineSource, boolean isFileParse, RubyInstanceConfig config)
      Deprecated.
    • ParserConfiguration

      public ParserConfiguration(Ruby runtime, int lineNumber, boolean inlineSource, boolean isFileParse, boolean saveData, RubyInstanceConfig config)
  • Method Details

    • setDefaultEncoding

      public void setDefaultEncoding(org.jcodings.Encoding encoding)
    • getDefaultEncoding

      public org.jcodings.Encoding getDefaultEncoding()
    • getEncodingService

      public EncodingService getEncodingService()
    • isDebug

      public boolean isDebug()
    • isEvalParse

      public boolean isEvalParse()
      Is the requested parse for an eval()?
      Returns:
      true if for eval
    • getKCode

      public KCode getKCode()
    • getLineNumber

      public int getLineNumber()
    • parseAsBlock

      public void parseAsBlock(DynamicScope existingScope)
      If we are performing an eval we should pass existing scope in. Calling this lets the parser know we need to do this.
      Parameters:
      existingScope - is the scope that captures new vars, etc...
    • getRuntime

      public Ruby getRuntime()
    • isSaveData

      public boolean isSaveData()
      Get whether we are saving the DATA contents of the file.
    • isInlineSource

      public boolean isInlineSource()
      Are we parsing source provided as part of the '-e' option to Ruby.
      Returns:
      true if source is from -e option