Package examples.ast

Class BinaryExpression


public class BinaryExpression extends Expression
Expressions with two operands and one operator.
  • Field Details

    • operator

      public String operator
      The operator of the expression.
    • operand1

      public Expression operand1
      The first operand of the expression.
    • operand2

      public Expression operand2
      The second operand of the expression.
  • Constructor Details

    • BinaryExpression

      public BinaryExpression(int line, int column, String operator, Expression operand1, Expression operand2)
      Constructor of a binary expression.
      Parameters:
      line - Line of the expression.
      column - Column of the expression.
      operator - Operator of the expression.
      operand1 - First operand of the expression.
      operand2 - Second operand of the expression.
  • Method Details