class JSubtractOp extends JBinaryExpression
lhs, operator, rhs
isStatementExpression, type
compilationUnit, 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.
|
writeToStdOut
codegen, isStatementExpression, type
line, partialCodegen
public 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 JExpression
context
- context in which names are resolved.