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.Encoding
getKCode()
int
boolean
isDebug()
boolean
Is the requested parse for an eval()?boolean
Are we parsing source provided as part of the '-e' option to Ruby.boolean
Get whether we are saving the DATA contents of the file.void
parseAsBlock
(DynamicScope existingScope) If we are performing an eval we should pass existing scope in.void
setDefaultEncoding
(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
-