Package | Description |
---|---|
ast | |
parser |
Modifier and Type | Class and Description |
---|---|
class |
BlockStmt
The BlockStmt class represents a block statement, which
contains a list of statements.
|
class |
BreakStmt
The BreakStmt class represents a break statement
appearing within in a loop in a method declaration.
|
class |
DeclStmt
The DeclStmt class represents a variable declaration statement
appearing in a method declaration.
|
class |
ExprStmt
The ExprStmt class represents an expression statement
(a statement containing a single expression) appearing in a method
declaration.
|
class |
ForStmt
The ForStmt class represents a for (loop) statement
appearing in a method declaration.
|
class |
IfStmt
The IfStmt class represents a if-then-else statement
appearing in a method declaration.
|
class |
ReturnStmt
The ReturnStmt class represents a return statement within
the body of a method.
|
class |
WhileStmt
The WhileStmt class represents a while (loop) statement
appearing in a method declaration.
|
Modifier and Type | Field and Description |
---|---|
protected Stmt |
ForStmt.bodyStmt
The body statement
|
protected Stmt |
WhileStmt.bodyStmt
The body statement
|
protected Stmt |
IfStmt.elseStmt
The else statement
|
protected Stmt |
IfStmt.thenStmt
The then statement
|
Modifier and Type | Method and Description |
---|---|
Stmt |
ForStmt.getBodyStmt()
Get the body statement
|
Stmt |
WhileStmt.getBodyStmt()
Get the body statement
|
Stmt |
IfStmt.getElseStmt()
Get the else statement
|
Stmt |
IfStmt.getThenStmt()
Get the then statement
|
Constructor and Description |
---|
ForStmt(int lineNum,
Expr initExpr,
Expr predExpr,
Expr updateExpr,
Stmt bodyStmt)
ForStmt constructor
|
IfStmt(int lineNum,
Expr predExpr,
Stmt thenStmt,
Stmt elseStmt)
IfStmt constructor
|
WhileStmt(int lineNum,
Expr predExpr,
Stmt bodyStmt)
WhileStmt constructor
|
Modifier and Type | Method and Description |
---|---|
Stmt |
Parser.ParseStmt() |