class JLiteralInt extends JExpression
isStatementExpression, typecompilationUnit, line| Constructor and Description |
|---|
JLiteralInt(int line,
String text)
Construct an AST node for an int literal given its line number and string
representation.
|
| Modifier and Type | Method and Description |
|---|---|
JExpression |
analyze(Context context)
Analyzing an int literal is trivial.
|
void |
codegen(CLEmitter output)
Generating code for an int literal means generating code to push it onto
the stack.
|
void |
writeToStdOut(PrettyPrinter p)
Write the information pertaining to this AST to STDOUT.
|
codegen, isStatementExpression, typeline, partialCodegenpublic JLiteralInt(int line,
String text)
line - line in which the literal occurs in the source file.text - string representation of the literal.public JExpression analyze(Context context)
analyze in class JExpressioncontext - context in which names are resolved (ignored here).public void codegen(CLEmitter output)
public void writeToStdOut(PrettyPrinter p)
JASTwriteToStdOut in class JASTp - for pretty printing with indentation.