class JThis extends JExpression
isStatementExpression, type
compilationUnit, line
Constructor and Description |
---|
JThis(int line)
Construct an AST node for a "this" expression given its line number.
|
Modifier and Type | Method and Description |
---|---|
JExpression |
analyze(Context context)
Analysis involves simply determining the type in which we are, since that
determines the type of this target.
|
void |
codegen(CLEmitter output)
Simply generate code to load "this" onto the stack.
|
void |
writeToStdOut(PrettyPrinter p)
inheritDoc
|
codegen, isStatementExpression, type
line, partialCodegen
public JThis(int line)
line
- line in which the expression occurs in the source file.public JExpression analyze(Context context)
analyze
in class JExpression
context
- context in which names are resolved.public void codegen(CLEmitter output)
public void writeToStdOut(PrettyPrinter p)
writeToStdOut
in class JAST
p
- for pretty printing with indentation.