 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
public class
MultiplyExpression extends BinaryExpression {
|
|
|
int op; // ID
|
|
|
Expression left; // LHS expression
|
|
|
Expression right; // RHS expression
|
|
|
Type type; // Type of this
expression
|
|
|
Annotation ann; // Embedded Annotation
(default: null)
|
|
|
void code() { // Convert AST to
backend-IR or bytecodes
|
|
if (ann)
ann.execute(); //
call-back for metacomputation
|
|
|
left.code(); // generate code for LHS
|
|
|
right.code(); // generate code for RHS
|
|
|
add(op); // generate code for “operator”
|
|
|
}
|
|
|
… }
|
|