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