class JPlusAssignOp extends JAssignment
lhs, operator, rhsisStatementExpression, typecompilationUnit, line| Constructor and Description |
|---|
JPlusAssignOp(int line,
JExpression lhs,
JExpression rhs)
Construct the AST node for a += expression given its lhs and rhs
operands.
|
| Modifier and Type | Method and Description |
|---|---|
JExpression |
analyze(Context context)
Analyze the lhs and rhs, rewrite rhs as lhs + rhs (string concatenation)
if lhs is a String, and set the result type.
|
void |
codegen(CLEmitter output)
Code generation for += involves, generating code for loading any
necessary l-value onto the stack, for (unless a string concatenation)
loading the r-value, for (unless a statement) copying the r-value to its
proper place on the stack, and for doing the store.
|
writeToStdOutcodegen, isStatementExpression, typeline, partialCodegenpublic JPlusAssignOp(int line,
JExpression lhs,
JExpression rhs)
line - line in which the assignment 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)