Statement

Members

Functions

accept
void accept(Visitor v)

Support Visitor Pattern

comeFrom
bool comeFrom()
endsWithReturnStatement
inout(ReturnStatement) endsWithReturnStatement()

Does this statement end with a return statement?

flatten
Statements* flatten(Scope* sc)

Flatten out the scope by presenting the statement as an array of statements.

hasBreak
bool hasBreak()

Determine if an enclosed break would apply to this statement, such as if it is a loop or switch statement.

hasCode
bool hasCode()
hasContinue
bool hasContinue()

Determine if an enclosed continue would apply to this statement, such as if it is a loop statement.

isErrorStatement
inout(ErrorStatement) isErrorStatement()

A cheaper method of doing downcasting of Statements.

last
inout(Statement) last()

Find last statement in a sequence of statements.

scopeCode
Statement scopeCode(Scope* sc, Statement* sentry, Statement* sexception, Statement* sfinally)

If this statement has code that needs to run in a finally clause at the end of the current scope, return that code in the form of a Statement.

usesEH
bool usesEH()

Static functions

arraySyntaxCopy
Statements* arraySyntaxCopy(Statements* a)

Do syntax copy of an array of Statement's.

Inherited Members

From ASTNode

accept
void accept(Visitor v)

Visits this AST node using the given visitor.

Suggestion Box / Bug Report