|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ksu.cis.projects.bogor.ast.Node
edu.ksu.cis.projects.bogor.ast.Statement
edu.ksu.cis.projects.bogor.ast.BlockStatement
public class BlockStatement
The block (sequence of statements) statement AST.
| Field Summary | |
|---|---|
protected ArrayList<Statement> |
stmts
Holds the statements. |
| Fields inherited from class edu.ksu.cis.projects.bogor.ast.Node |
|---|
ILLEGAL_LOCAL_ID_CHAR |
| Constructor Summary | |
|---|---|
BlockStatement(List<? extends Statement> stmts)
Default constructor. |
|
| Method Summary | |
|---|---|
BlockStatement |
clone()
Clones this object (deep clone); including location info. |
void |
dispose()
Disposes stmt. |
Statement |
getStatement(int index)
Gets a statement at a specified index. |
int |
getStatementCount()
Gets the number of statements. |
void |
setStatements(List<? extends Statement> stmts)
Sets the statements. |
protected String |
toString(String indent)
Returns the string representation of this object. |
void |
visit(ASTVisitor visitor)
|
| Methods inherited from class edu.ksu.cis.projects.bogor.ast.Statement |
|---|
getParent, setParent, toString |
| Methods inherited from class edu.ksu.cis.projects.bogor.ast.Node |
|---|
getLocationInfo, getProperty, putProperty, setLocationInfo |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ArrayList<Statement> stmts
| Constructor Detail |
|---|
public BlockStatement(List<? extends Statement> stmts)
stmts - The statements. Must be non-null. Each element in stmts must
be non-null.| Method Detail |
|---|
public BlockStatement clone()
clone in class Statementpublic void dispose()
dispose in interface Disposabledispose in class Statementpublic Statement getStatement(int index)
index - The index of the statement. Must be between 0 and
getStatementCount() - 1, inclusive.
public int getStatementCount()
public void setStatements(List<? extends Statement> stmts)
stmts - The statements. Must be non-null. Each element in stmts must
be non-null.public void visit(ASTVisitor visitor)
visit in class Nodeprotected String toString(String indent)
toString in class Statementindent - The indentation for this statement.
"s1\n" +
"s2\n" +
"...\n" +
"sN\n".
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||