class JPostDecrementOp extends JUnaryExpression
arg
isStatementExpression, type
compilationUnit, line
Constructor and Description |
---|
JPostDecrementOp(int line,
JExpression arg)
Construct an AST node for an expr-- expression given its line number, and
the operand.
|
Modifier and Type | Method and Description |
---|---|
JExpression |
analyze(Context context)
Analyze the operand as a lhs (since there is a side effect), check types
and determine the type of the result.
|
void |
codegen(CLEmitter output)
In generating code for a post-decrement operation, we treat simple
variable (JVariable) operands specially since the JVM has an increment
instruction.
|
writeToStdOut
codegen, isStatementExpression, type
line, partialCodegen
public JPostDecrementOp(int line, JExpression arg)
line
- line in which the expression occurs in the source file.arg
- the operand.public JExpression analyze(Context context)
analyze
in class JExpression
context
- context in which names are resolved.public void codegen(CLEmitter output)