SwitchStatement

Members

Functions

checkLabel
bool checkLabel()

Variables

_body
Statement _body;
cases
CaseStatements* cases;

array of CaseStatement's

condition
Expression condition;

switch(condition)

gotoCases
GotoCaseStatements gotoCases;

array of unresolved GotoCaseStatement's

hasNoDefault
int hasNoDefault;

!=0 if no default statement

hasVars
int hasVars;

!=0 if has variable case values

isFinal
bool isFinal;

https://dlang.org/spec/statement.html#final-switch-statement

lastVar
VarDeclaration lastVar;

last observed variable declaration in this statement

sdefault
DefaultStatement sdefault;

default:

tf
TryFinallyStatement tf;

set if in the 'finally' block of a TryFinallyStatement

tryBody
Statement tryBody;

set to TryCatchStatement or TryFinallyStatement if in _body portion

Inherited Members

From Statement

arraySyntaxCopy
Statements* arraySyntaxCopy(Statements* a)

Do syntax copy of an array of Statement's.

hasBreak
bool hasBreak()

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

hasContinue
bool hasContinue()

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

usesEH
bool usesEH()
comeFrom
bool comeFrom()
hasCode
bool hasCode()
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.

flatten
Statements* flatten(Scope* sc)

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

last
inout(Statement) last()

Find last statement in a sequence of statements.

accept
void accept(Visitor v)

Support Visitor Pattern

endsWithReturnStatement
inout(ReturnStatement) endsWithReturnStatement()

Does this statement end with a return statement?

isErrorStatement
inout(ErrorStatement) isErrorStatement()

A cheaper method of doing downcasting of Statements.

Suggestion Box / Bug Report