class JSubtractOp extends JBinaryExpression
lhs, operator, rhsisStatementExpression, typecompilationUnit, line| Constructor and Description |
|---|
JSubtractOp(int line,
JExpression lhs,
JExpression rhs)
Construct an AST node for a subtraction expression given its line number,
and lhs and rhs operands.
|
| Modifier and Type | Method and Description |
|---|---|
JExpression |
analyze(Context context)
Analyzing the - operation involves analyzing its operands, checking
types, and determining the result type.
|
void |
codegen(CLEmitter output)
Generating code for the - operation involves generating code for the two
operands, and then the subtraction instruction.
|
writeToStdOutcodegen, isStatementExpression, typeline, partialCodegenpublic JSubtractOp(int line,
JExpression lhs,
JExpression rhs)
line - line in which the subtraction expression occurs in the source
file.lhs - the lhs operand.rhs - the rhs operand.public JExpression analyze(Context context)
analyze in class JExpressioncontext - context in which names are resolved.