Module dev.civl.mc

Interface BinaryExpression

All Superinterfaces:
Expression, Sourceable

public interface BinaryExpression extends Expression
A binary operation.
  • Method Details

    • left

      Expression left()
      Returns:
      The left operand.
    • operator

      Returns:
      The binary operator
    • operatorToString

      String operatorToString()
    • right

      Expression right()
      Returns:
      The right operand.
    • setAssignToLeft

      void setAssignToLeft(boolean value)
    • isAssignToLeft

      boolean isAssignToLeft()
      Is the value of this binary expression going to be assigned to the left-hand-side operand?
      Returns:
    • switchOperands

      boolean switchOperands()
      Switch the left and right operands when the operator is symmetric, and return true; If the operator is not symmetric, then do nothing and return false.
      Returns: