Class ReturnStatement


public final class ReturnStatement extends Statement
A return statement.
  • Method Details

    • make

      public static Statement make(int pos, @Nullable Expression expression)
    • getExpression

      @Nullable public Expression getExpression()
    • setExpression

      public void setExpression(@Nullable Expression expression)
    • getKind

      public Node.StatementKind getKind()
      Specified by:
      getKind in class Statement
      See Also:
    • accept

      public boolean accept(@Nonnull TreeVisitor visitor)
      Description copied from class: Node
      Visit this AST with a given visitor.
      Specified by:
      accept in class Node
      Returns:
      true to stop recursion and propagate true up the stack, false to continue
    • toString

      @Nonnull public String toString()
      Specified by:
      toString in class Node
      Returns:
      a string representation of this AST node