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
Modifier and TypeFieldDescriptionprotected JExpression
The lhs operand.protected String
The binary operator.protected JExpression
The rhs operand.Fields inherited from class jminusminus.JExpression
isStatementExpression, type
Fields inherited from class jminusminus.JAST
compilationUnit, line
-
Constructor Summary
ModifierConstructorDescriptionprotected
JBinaryExpression
(int line, String operator, JExpression lhs, JExpression rhs) Constructs an AST node for a binary expression. -
Method Summary
Modifier and TypeMethodDescriptionvoid
toJSON
(JSONElement json) Stores information about this AST in JSON format.Methods inherited from class jminusminus.JExpression
analyze, codegen, isStatementExpression, type
Methods 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