Package iota

Class IUnaryExpression

Direct Known Subclasses:
ILogicalNotOp, INegateOp

abstract class IUnaryExpression extends IExpression
This abstract base class is the AST node for a unary expression --- an expression with a single operand.
  • Field Details

    • operator

      protected String operator
      The unary operator.
    • operand

      protected IExpression operand
      The operand.
  • Constructor Details

    • IUnaryExpression

      protected IUnaryExpression(int line, String operator, IExpression operand)
      Constructs an AST node for a unary expression.
      Parameters:
      line - line in which the unary expression occurs in the source file.
      operator - the unary operator.
      operand - the operand.
  • Method Details

    • toJSON

      public void toJSON(JSONElement json)
      Stores information about this AST in JSON format.
      Overrides:
      toJSON in class IAST
      Parameters:
      json - the JSON emitter.