Package iota

Class IBinaryExpression

Direct Known Subclasses:
IAssignOp, IBooleanBinaryExpression, IDivideOp, IMultiplyOp, IPlusOp, IRemainderOp, ISubtractOp

abstract class IBinaryExpression extends IExpression
This abstract base class is the AST node for a binary expression --- an expression with a binary operator and two operands: lhs and rhs.
  • Field Details

    • operator

      protected String operator
      The binary operator.
    • lhs

      protected IExpression lhs
      The lhs operand.
    • rhs

      protected IExpression rhs
      The rhs operand.
  • Constructor Details

    • IBinaryExpression

      protected IBinaryExpression(int line, String operator, IExpression lhs, IExpression rhs)
      Constructs an AST node for a binary expression.
      Parameters:
      line - line in which the binary expression occurs in the source file.
      operator - the binary operator.
      lhs - the lhs operand.
      rhs - the rhs 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.