public class ParserConfiguration extends Object
Constructor and Description |
---|
ParserConfiguration(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) |
Modifier and Type | Method and Description |
---|---|
void |
coverLine(int i)
Zero out coverable lines as they're encountered
|
CoverageData |
finishCoverage(String file,
int lines)
At end of a parse if coverage is enabled we will do final processing
of the primitive coverage array and make sure runtimes coverage data
has been updated with this new data.
|
int[] |
getCoverage()
Deprecated.
|
org.jcodings.Encoding |
getDefaultEncoding() |
EncodingService |
getEncodingService() |
KCode |
getKCode() |
int |
getLineNumber() |
Ruby |
getRuntime() |
DynamicScope |
getScope(String file)
This method returns the appropriate first scope for the parser.
|
void |
growCoverageLines(int i)
Called by coverLine to grow it large enough to add new covered line.
|
boolean |
isCoverageEnabled() |
boolean |
isDebug() |
boolean |
isEvalParse()
Is the requested parse for an eval()?
|
boolean |
isFrozenStringLiteral() |
boolean |
isInlineSource()
Are we parsing source provided as part of the '-e' option to Ruby.
|
boolean |
isSaveData()
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) |
void |
setFrozenStringLiteral(boolean frozenStringLiteral) |
public ParserConfiguration(Ruby runtime, int lineNumber, boolean inlineSource, boolean isFileParse, boolean saveData)
public ParserConfiguration(Ruby runtime, int lineNumber, boolean inlineSource, boolean isFileParse, RubyInstanceConfig config)
public ParserConfiguration(Ruby runtime, int lineNumber, boolean inlineSource, boolean isFileParse, boolean saveData, RubyInstanceConfig config)
public void setFrozenStringLiteral(boolean frozenStringLiteral)
public boolean isFrozenStringLiteral()
public void setDefaultEncoding(org.jcodings.Encoding encoding)
public org.jcodings.Encoding getDefaultEncoding()
public EncodingService getEncodingService()
public boolean isDebug()
public boolean isEvalParse()
public KCode getKCode()
public int getLineNumber()
public void parseAsBlock(DynamicScope existingScope)
existingScope
- is the scope that captures new vars, etc...public Ruby getRuntime()
public DynamicScope getScope(String file)
public boolean isCoverageEnabled()
public boolean isSaveData()
public boolean isInlineSource()
public void coverLine(int i)
public void growCoverageLines(int i)
public CoverageData finishCoverage(String file, int lines)
@Deprecated public int[] getCoverage()
Copyright © 2001-2016 JRuby. All Rights Reserved.