Class TruffleLanguage.InlineParsingRequest

java.lang.Object
com.oracle.truffle.api.TruffleLanguage.InlineParsingRequest
Enclosing class:
TruffleLanguage<C>

public static final class TruffleLanguage.InlineParsingRequest extends Object
Request for inline parsing. Contains information of what to parse and in which context.
Since:
0.31
  • Method Details

    • getSource

      public Source getSource()
      The source code to parse.
      Returns:
      the source code, never null
      Since:
      0.31
    • getOptionValues

      public OptionValues getOptionValues()
      Returns the source option values associated with the parsing request's source and language. This method should be preferred over Source.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

      public Node getLocation()
      Specifies the code location for parsing. The location is specified as an instance of a Node in the AST. The node can be EventContext.getInstrumentedNode(), for example.
      Returns:
      a Node defining AST context for the parsing, it's never null
      Since:
      0.31
    • getFrame

      public MaterializedFrame getFrame()
      Specifies the execution context for parsing. If the parsing request is used for evaluation during halted execution, for example as in DebugStackFrame.eval(String) method, this method provides access to current frame with local variables, etc.
      Returns:
      a MaterializedFrame exposing the current execution state or null if there is none
      Since:
      0.31