Constructor
new BinaryOp(op, lhs, rhs)
Constructs a BinaryOp whose operator is op and whose left and right operands
are lhs and rhs.
Parameters:
Name | Type | Description |
---|---|---|
op |
* | The binary operator associated with this ast. This parameter must be one of the constants defined in the BinaryOp class such as BinaryOp.AND |
lhs |
AST | The left hand side operand |
rhs |
AST | The right hand side operand |
- Source:
Extends
Members
(static, constant) AND
- Source:
(static, constant) EQUALS
- Source:
(static, constant) NOT_EQUAL
- Source:
(static, constant) OR
- Source:
(static, constant) XOR
- Source:
Methods
accept()
Overrides AST#accept
- Overrides:
- Source:
getLHS() → {AST}
Gets the left hand side operand associated with this binary operation
- Source:
Returns:
The left hand side operand
- Type
- AST
getOp() → {*}
Gets the operator associated with this binary operation. The returned value
will be one of the constants defined in the BinaryOp class such as
BinaryOp.AND
- Source:
Returns:
The operator
- Type
- *
getRHS() → {AST}
Gets the right hand side operand associated with this binary operation
- Source:
Returns:
The right hand side operand
- Type
- AST