class JLiteralChar extends JExpression
isStatementExpression, type
compilationUnit, line
Constructor and Description |
---|
JLiteralChar(int line,
String text)
Construct an AST node for a char literal given its line number and text
representation.
|
Modifier and Type | Method and Description |
---|---|
JExpression |
analyze(Context context)
Analyzing a char literal is trivial.
|
void |
codegen(CLEmitter output)
Generating code for a char 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, type
line, partialCodegen
public JLiteralChar(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 JExpression
context
- context in which names are resolved (ignored here).public void codegen(CLEmitter output)
public void writeToStdOut(PrettyPrinter p)
JAST
writeToStdOut
in class JAST
p
- for pretty printing with indentation.