Class TruffleLanguage.InlineParsingRequest
java.lang.Object
com.oracle.truffle.api.TruffleLanguage.InlineParsingRequest
- Enclosing class:
TruffleLanguage<C>
Request for inline parsing. Contains information of what to parse and in which context.
- Since:
- 0.31
-
Method Summary
Modifier and TypeMethodDescriptiongetFrame()
Specifies the execution context for parsing.Specifies the code location for parsing.Returns the source option values associated with the parsing request's source and language.The source code to parse.
-
Method Details
-
getSource
The source code to parse.- Returns:
- the source code, never
null
- Since:
- 0.31
-
getOptionValues
Returns the source option values associated with the parsing request's source and language. This method should be preferred overSource.getOptions(TruffleLanguage)
when accessing the source options of a source when possible, to avoid parsing the options twice.In order to allow users of the language to specify source options they must be declared by implementing
TruffleLanguage.getSourceOptionDescriptors()
.- Since:
- 25.0
-
getLocation
Specifies the code location for parsing. The location is specified as an instance of aNode
in the AST. The node can beEventContext.getInstrumentedNode()
, for example.- Returns:
- a
Node
defining AST context for the parsing, it's nevernull
- Since:
- 0.31
-
getFrame
Specifies the execution context for parsing. If the parsing request is used for evaluation during halted execution, for example as inDebugStackFrame.eval(String)
method, this method provides access to currentframe
with local variables, etc.- Returns:
- a
MaterializedFrame
exposing the current execution state ornull
if there is none - Since:
- 0.31
-