class JMultiplyOp extends JBinaryExpression
lhs, operator, rhs
isStatementExpression, type
compilationUnit, line
Constructor and Description |
---|
JMultiplyOp(int line,
JExpression lhs,
JExpression rhs)
Construct an AST for a multiplication expression given its line number,
and the 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 multiplication instruction.
|
writeToStdOut
codegen, isStatementExpression, type
line, partialCodegen
public JMultiplyOp(int line, JExpression lhs, JExpression rhs)
line
- line in which the multiplication 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.public void codegen(CLEmitter output)