Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
ddmd.statement
Compiler implementation of the
D programming language.
Authors:
License:
Source: statement.d
- Identifier
fixupLabelName(Scope*sc, Identifierident); - CTFE requires FuncDeclaration::labtab for the interpretation. So fixing the label name inside in/out contracts is necessary for the uniqueness in labtab.Parameters:
Scope* sccontext Identifier identstatement label name to be adjusted Returns:adjusted label name - LabelStatement
checkLabeledLoop(Scope*sc, Statementstatement); - Check to see if
statementis the innermost labeledstatement.Parameters:Scope* sccontext Statement statementStatement to check Returns:if true, then the LabelStatement, otherwise null - Expression
checkAssignmentAsCondition(Expressione); - Check an assignment is used as a condition. Intended to be use before the semantic call on
e.Parameters:Expression econdition expression which is not yet run semantic analysis. Returns:eor ErrorExp. - TypeIdentifier
getThrowable(); - Returns:TypeIdentifier corresponding to object.Throwable
- abstract class
Statement: ddmd.root.rootobject.RootObject; Specification:
http: //dlang.org/spec/statement.html
- bool
hasBreak(); - Determine if an enclosed break would apply to this statement, such as if it is a loop or switch statement.Returns:true if it does
- bool
hasContinue(); - Determine if an enclosed continue would apply to this statement, such as if it is a loop statement.Returns:true if it does
- final bool
usesEH(); - Returns:true if statement uses exception handling
- final bool
comeFrom(); - Returns:true if statement 'comes from' somewhere else, like a goto
- final bool
hasCode(); - Returns:true if statement has executable code.
- 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.Parameters:
Scope* sccontext Statement* sentryset to code executed upon entry to the scope Statement* sexceptionset to code executed upon exit from the scope via exception Statement* sfinallyset to code executed in finally block Returns:code to be run in the finally clause - Statements*
flatten(Scope*sc); - Flatten out the scope by presenting the statement as an array of statements.Parameters:
Scope* sccontext Returns:The array of Statements, or null if no flattening necessary - inout pure nothrow inout(Statement)
last(); - Find
laststatement in a sequence of statements.Returns:thelaststatement, or null if there isn't one - ErrorStatement
isErrorStatement();
inout pure nothrow inout(ScopeStatement)isScopeStatement();
ExpStatementisExpStatement();
inout pure nothrow inout(CompoundStatement)isCompoundStatement();
inout pure nothrow inout(ReturnStatement)isReturnStatement();
IfStatementisIfStatement();
CaseStatementisCaseStatement();
DefaultStatementisDefaultStatement();
LabelStatementisLabelStatement();
pure GotoDefaultStatementisGotoDefaultStatement();
pure GotoCaseStatementisGotoCaseStatement();
inout pure nothrow inout(BreakStatement)isBreakStatement();
DtorExpStatementisDtorExpStatement();
ForwardingStatementisForwardingStatement(); - A cheaper method of doing downcasting of Statements.Returns:the downcast statement if it can be downcasted, otherwise null
- void
accept(Visitorv); - Support Visitor PatternParameters:
Visitor vvisitor
- class
ErrorStatement: ddmd.statement.Statement; - Any Statement that fails semantic() or has a component that is an ErrorExp or a TypeError should return an
ErrorStatementfrom semantic(). - class
PeelStatement: ddmd.statement.Statement; - Statement
toStatement(Dsymbols); - Convert TemplateMixin members (== Dsymbols) to Statements.
- class
ExpStatement: ddmd.statement.Statement; - class
DtorExpStatement: ddmd.statement.ExpStatement; - class
CompileStatement: ddmd.statement.Statement; - class
CompoundStatement: ddmd.statement.Statement; -
- final this(Loc
loc, Statements*s); - Construct a CompoundStatement using an already existing array of Statement
sParameters:Loc locInstantiation information Statements* sAn array of Statement s, that will referenced by this class - final this(Loc
loc, Statement[]sts...); - Construct a CompoundStatement from an array of StatementsParameters:
Loc locInstantiation information s A variadic array of Statements, that will copied in this class The entries themselves will not be copied.
- class
CompoundDeclarationStatement: ddmd.statement.CompoundStatement; - class
UnrolledLoopStatement: ddmd.statement.Statement; - The purpose of this is so that continue will go to the next of the statements, and break will go to the end of the statements.
- class
ScopeStatement: ddmd.statement.Statement; - class
ForwardingStatement: ddmd.statement.Statement; - Statement whose symbol table contains foreach index variables in a local scope and forwards other members to the parent scope. This wraps a statement.Also see: ddmd.attrib.ForwardingAttribDeclaration
- ForwardingScopeDsymbol
sym; - The symbol containing the static foreach variables.
- Statement
statement; - The wrapped
statement. - Statements*
flatten(Scope*sc); - ForwardingStatements are distributed over the flattened sequence of statements. This prevents flattening to be "blocked" by a ForwardingStatement and is necessary, for example, to support generating scope guards with `static foreach`:static foreach(i; 0 .. 10) scope(exit) writeln(i); writeln("this is printed first"); // then, it prints 10, 9, 8, 7, ...
- class
WhileStatement: ddmd.statement.Statement; - class
DoStatement: ddmd.statement.Statement; - class
ForStatement: ddmd.statement.Statement; - class
ForeachStatement: ddmd.statement.Statement; - class
ForeachRangeStatement: ddmd.statement.Statement; - class
IfStatement: ddmd.statement.Statement; - class
ConditionalStatement: ddmd.statement.Statement; - class
StaticForeachStatement: ddmd.statement.Statement; - Static foreach statements, like: void main() { static foreach(i; 0 .. 10) { pragma(msg, i); } }
- class
PragmaStatement: ddmd.statement.Statement; - class
StaticAssertStatement: ddmd.statement.Statement; - class
SwitchStatement: ddmd.statement.Statement; - class
CaseStatement: ddmd.statement.Statement; - class
CaseRangeStatement: ddmd.statement.Statement; - class
DefaultStatement: ddmd.statement.Statement; - class
GotoDefaultStatement: ddmd.statement.Statement; - class
GotoCaseStatement: ddmd.statement.Statement; - class
SwitchErrorStatement: ddmd.statement.Statement; - class
ReturnStatement: ddmd.statement.Statement; - class
BreakStatement: ddmd.statement.Statement; - class
ContinueStatement: ddmd.statement.Statement; - class
SynchronizedStatement: ddmd.statement.Statement; - class
WithStatement: ddmd.statement.Statement; - class
TryCatchStatement: ddmd.statement.Statement; - class
Catch: ddmd.root.rootobject.RootObject; - class
TryFinallyStatement: ddmd.statement.Statement; - class
OnScopeStatement: ddmd.statement.Statement; - class
ThrowStatement: ddmd.statement.Statement; - class
DebugStatement: ddmd.statement.Statement; - class
GotoStatement: ddmd.statement.Statement; - class
LabelStatement: ddmd.statement.Statement; - class
LabelDsymbol: ddmd.dsymbol.Dsymbol; - class
AsmStatement: ddmd.statement.Statement; - class
CompoundAsmStatement: ddmd.statement.CompoundStatement; - a complete asm {} block
- class
ImportStatement: ddmd.statement.Statement;
Copyright © 1999-2017 by the D Language Foundation | Page generated by
Ddoc on Sat Nov 4 04:02:15 2017