class JAssignOp extends JAssignment
lhs, operator, rhs
isStatementExpression, type
compilationUnit, line
Constructor and Description |
---|
JAssignOp(int line,
JExpression lhs,
JExpression rhs)
Construct the AST node for an assignment (=) expression given the lhs and
rhs operands.
|
Modifier and Type | Method and Description |
---|---|
JExpression |
analyze(Context context)
Analyze the lhs and rhs, checking that types match, and set the result
type.
|
void |
codegen(CLEmitter output)
Code generation for an assignment involves, generating code for loading
any necessary Lvalue onto the stack, for loading the Rvalue, for (unless
a statement) copying the Rvalue to its proper place on the stack, and for
doing the store.
|
writeToStdOut
codegen, isStatementExpression, type
line, partialCodegen
public JAssignOp(int line, JExpression lhs, JExpression rhs)
line
- line in which the assignment expression occurs in the source
file.lhs
- lhs operand.rhs
- rhs operand.public JExpression analyze(Context context)
analyze
in class JExpression
context
- context in which names are resolved.public void codegen(CLEmitter output)