class JEqualOp extends JBooleanBinaryExpression
lhs, operator, rhsisStatementExpression, typecompilationUnit, line| Constructor and Description |
|---|
JEqualOp(int line,
JExpression lhs,
JExpression rhs)
Construct an AST node for an equality expression.
|
| Modifier and Type | Method and Description |
|---|---|
JExpression |
analyze(Context context)
Analyzing an equality expression means analyzing its operands and
checking that the types match.
|
void |
codegen(CLEmitter output,
String targetLabel,
boolean onTrue)
Branching code generation for == operation.
|
codegenwriteToStdOutisStatementExpression, typeline, partialCodegenpublic JEqualOp(int line,
JExpression lhs,
JExpression rhs)
line - line number in which the equality expression occurs in the
source file.lhs - lhs operand.rhs - rhs operand.public JExpression analyze(Context context)
analyze in class JExpressioncontext - context in which names are resolved.public void codegen(CLEmitter output, String targetLabel, boolean onTrue)
codegen in class JExpressionoutput - the code emitter (basically an abstraction for producing the
.class file).targetLabel - target for generated branch instruction.onTrue - should we branch on true?