class JWhileStatement extends JStatement
compilationUnit, line| Constructor and Description |
|---|
JWhileStatement(int line,
JExpression condition,
JStatement body)
Construct an AST node for a while-statement given its line number, the
test expression, and the body.
|
| Modifier and Type | Method and Description |
|---|---|
JWhileStatement |
analyze(Context context)
Analysis involves analyzing the test, checking its type and analyzing the
body statement.
|
void |
codegen(CLEmitter output)
Generate code for the while loop.
|
void |
writeToStdOut(PrettyPrinter p)
Write the information pertaining to this AST to STDOUT.
|
line, partialCodegenpublic JWhileStatement(int line,
JExpression condition,
JStatement body)
line - line in which the while-statement occurs in the source file.condition - test expression.body - the body.public JWhileStatement analyze(Context context)
public void codegen(CLEmitter output)
public void writeToStdOut(PrettyPrinter p)
JASTwriteToStdOut in class JASTp - for pretty printing with indentation.