Package jminusminus
Class JBinaryExpression
java.lang.Object
jminusminus.JAST
jminusminus.JStatement
jminusminus.JExpression
jminusminus.JBinaryExpression
- Direct Known Subclasses:
JALeftShiftOp,JAndOp,JARightShiftOp,JAssignment,JBooleanBinaryExpression,JDivideOp,JLRightShiftOp,JMultiplyOp,JOrOp,JPlusOp,JRemainderOp,JStringConcatenationOp,JSubtractOp,JXorOp
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 Summary
FieldsModifier and TypeFieldDescriptionprotected JExpressionThe lhs operand.protected StringThe binary operator.protected JExpressionThe rhs operand.Fields inherited from class jminusminus.JExpression
isStatementExpression, typeFields inherited from class jminusminus.JAST
compilationUnit, line -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJBinaryExpression(int line, String operator, JExpression lhs, JExpression rhs) Constructs an AST node for a binary expression. -
Method Summary
Modifier and TypeMethodDescriptionvoidtoJSON(JSONElement json) Stores information about this AST in JSON format.Methods inherited from class jminusminus.JExpression
analyze, codegen, isStatementExpression, typeMethods inherited from class jminusminus.JAST
codegen, line, partialCodegen, unescape
-
Field Details
-
operator
The binary operator. -
lhs
The lhs operand. -
rhs
The rhs operand.
-
-
Constructor Details
-
JBinaryExpression
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