class JMultiplyOp extends JBinaryExpression
lhs, operator, rhsisStatementExpression, typecompilationUnit, 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.
|
writeToStdOutcodegen, isStatementExpression, typeline, partialCodegenpublic 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 JExpressioncontext - context in which names are resolved.public void codegen(CLEmitter output)