Package org.jruby.parser
Class ParserConfiguration
java.lang.Object
org.jruby.parser.ParserConfiguration
-
Constructor Summary
ConstructorsConstructorDescriptionParserConfiguration(Ruby runtime, int lineNumber, boolean inlineSource, boolean isFileParse, boolean saveData) ParserConfiguration(Ruby runtime, int lineNumber, boolean inlineSource, boolean isFileParse, boolean saveData, RubyInstanceConfig config) ParserConfiguration(Ruby runtime, int lineNumber, boolean inlineSource, boolean isFileParse, RubyInstanceConfig config) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionorg.jcodings.EncodinggetKCode()intbooleanisDebug()booleanIs the requested parse for an eval()?booleanAre we parsing source provided as part of the '-e' option to Ruby.booleanGet whether we are saving the DATA contents of the file.voidparseAsBlock(DynamicScope existingScope) If we are performing an eval we should pass existing scope in.voidsetDefaultEncoding(org.jcodings.Encoding encoding)
-
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
-
isDebug
public boolean isDebug() -
isEvalParse
public boolean isEvalParse()Is the requested parse for an eval()?- Returns:
- true if for eval
-
getKCode
-
getLineNumber
public int getLineNumber() -
parseAsBlock
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
-
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
-