Class SLParenExpressionNode

All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, Cloneable

public class SLParenExpressionNode extends SLExpressionNode
A SLExpressionNode that represents a parenthesized expression; it simply returns the value of the enclosed (child) expression. It is represented separately in the AST for the purpose of correct source attribution; this preserves the lexical relationship between the two parentheses and allows a tool to describe the expression as distinct from its contents.
  • Constructor Details

    • SLParenExpressionNode

      public SLParenExpressionNode(SLExpressionNode expression)
  • Method Details

    • executeGeneric

      public Object executeGeneric(com.oracle.truffle.api.frame.VirtualFrame frame)
      Description copied from class: SLExpressionNode
      The execute method when no specialization is possible. This is the most general case, therefore it must be provided by all subclasses.
      Specified by:
      executeGeneric in class SLExpressionNode
    • executeLong

      public long executeLong(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException
      Overrides:
      executeLong in class SLExpressionNode
      Throws:
      com.oracle.truffle.api.nodes.UnexpectedResultException
    • executeBoolean

      public boolean executeBoolean(com.oracle.truffle.api.frame.VirtualFrame frame) throws com.oracle.truffle.api.nodes.UnexpectedResultException
      Overrides:
      executeBoolean in class SLExpressionNode
      Throws:
      com.oracle.truffle.api.nodes.UnexpectedResultException