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.
		
	dmd.statement
Defines AST nodes for statements.
Specification Statements
Authors: 
License: 
Source statement.d
Documentation https://dlang.org/phobos/dmd_statement.html
- TypeIdentifiergetThrowable();
- Returns:TypeIdentifier corresponding to object.Throwable
- TypeIdentifiergetException();
- Returns:TypeIdentifier corresponding to object.Exception
- enumSTMT: ubyte;
- Identify Statement types with this enum rather than virtual functions.
- abstract classStatement: dmd.ast_node.ASTNode;
- Specification http://dlang.org/spec/statement.html - static Statements*arraySyntaxCopy(Statements*a);
- Do syntax copy of an array of Statement's.
- const pure nothrow boolhasBreak();
- 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
- const pure nothrow boolhasContinue();
- Determine if an enclosed continue would apply to this statement, such as if it is a loop statement.Returns:true if it does
- final boolusesEH();
- Returns:true if statement uses exception handling
- final boolcomeFrom();
- Returns:true if statement 'comes from' somewhere else, like a goto
- final boolhasCode();
- Returns:true if statement has executable code.
- StatementscopeCode(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 last statement in a sequence of statements.Returns:the last statement, or null if there isn't one
- voidaccept(Visitorv);
- Support Visitor PatternParameters:Visitor vvisitor 
- inout pure nothrow @nogc inout(ReturnStatement)endsWithReturnStatement();
- Does this statement end with a return statement?I.e. is it a single return statement or some compound statement that unconditionally hits a return statement.Returns:return statement it ends with, otherwise null
- final inout pure nothrow @nogc inout(ErrorStatement)isErrorStatement();
- A cheaper method of doing downcasting of Statements.Returns:the downcast statement if it can be downcasted, otherwise null
 
- classErrorStatement: dmd.statement.Statement;
- Any Statement that fails semantic() or has a component that is an ErrorExp or a TypeError should return an ErrorStatement from semantic().
- classPeelStatement: dmd.statement.Statement;
- classExpStatement: dmd.statement.Statement;
- classDtorExpStatement: dmd.statement.ExpStatement;
- classCompileStatement: dmd.statement.Statement;
- classCompoundStatement: dmd.statement.Statement;
- 
- final this(ref const Locloc, Statements*statements);
- Construct a CompoundStatement using an already existing array of StatementsParameters:Loc locInstantiation information Statements* statementsAn array of Statements, that will referenced by this class 
- final this(ref const Locloc, Statement[]sts...);
- Construct a CompoundStatement from an array of StatementsParameters:Loc locInstantiation information Statement[] stsA variadic array of Statements, that will copied in this class The entries themselves will not be copied. 
 
- classCompoundDeclarationStatement: dmd.statement.CompoundStatement;
- classUnrolledLoopStatement: dmd.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.
- classScopeStatement: dmd.statement.Statement;
- classForwardingStatement: dmd.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: dmd.attrib.ForwardingAttribDeclaration- ForwardingScopeDsymbolsym;
- The symbol containing the static foreach variables.
- Statementstatement;
- 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, ...
 
- classWhileStatement: dmd.statement.Statement;
- classDoStatement: dmd.statement.Statement;
- classForStatement: dmd.statement.Statement;
- classForeachStatement: dmd.statement.Statement;
- classForeachRangeStatement: dmd.statement.Statement;
- classIfStatement: dmd.statement.Statement;
- classConditionalStatement: dmd.statement.Statement;
- classStaticForeachStatement: dmd.statement.Statement;
- https://dlang.org/spec/version.html#StaticForeachStatement Static foreach statements, like: void main() { static foreach(i; 0 .. 10) { pragma(msg, i); } }
- classPragmaStatement: dmd.statement.Statement;
- classStaticAssertStatement: dmd.statement.Statement;
- classSwitchStatement: dmd.statement.Statement;
- 
- Expressioncondition;
- switch(condition)
- Statement_body;
- boolisFinal;
- DefaultStatementsdefault;
- default:
- StatementtryBody;
- set to TryCatchStatement or TryFinallyStatement if in body portion
- TryFinallyStatementtf;
- set if in the 'finally' block of a TryFinallyStatement
- GotoCaseStatementsgotoCases;
- array of unresolved GotoCaseStatement's
- CaseStatements*cases;
- array of CaseStatement's
- inthasNoDefault;
- !=0 if no default statement
- inthasVars;
- !=0 if has variable case values
- VarDeclarationlastVar;
- last observed variable declaration in this statement
- boolcheckLabel();
- Returns:true if error
 
- classCaseStatement: dmd.statement.Statement;
- classCaseRangeStatement: dmd.statement.Statement;
- classDefaultStatement: dmd.statement.Statement;
- classGotoDefaultStatement: dmd.statement.Statement;
- classGotoCaseStatement: dmd.statement.Statement;
- classSwitchErrorStatement: dmd.statement.Statement;
- classReturnStatement: dmd.statement.Statement;
- classBreakStatement: dmd.statement.Statement;
- classContinueStatement: dmd.statement.Statement;
- classSynchronizedStatement: dmd.statement.Statement;
- classWithStatement: dmd.statement.Statement;
- classTryCatchStatement: dmd.statement.Statement;
- 
- StatementtryBody;
- set to enclosing TryCatchStatement or TryFinallyStatement if in body portion
 
- classCatch: dmd.root.rootobject.RootObject;
- classTryFinallyStatement: dmd.statement.Statement;
- 
- StatementtryBody;
- set to enclosing TryCatchStatement or TryFinallyStatement if in body portion
- boolbodyFallsThru;
- true if body falls through to finally
 
- classScopeGuardStatement: dmd.statement.Statement;
- classThrowStatement: dmd.statement.Statement;
- classDebugStatement: dmd.statement.Statement;
- classGotoStatement: dmd.statement.Statement;
- 
- StatementtryBody;
- set to TryCatchStatement or TryFinallyStatement if in body portion
 
- classLabelStatement: dmd.statement.Statement;
- 
- StatementtryBody;
- set to TryCatchStatement or TryFinallyStatement if in body portion
 
- classLabelDsymbol: dmd.dsymbol.Dsymbol;
- classAsmStatement: dmd.statement.Statement;
- classInlineAsmStatement: dmd.statement.AsmStatement;
- classGccAsmStatement: dmd.statement.AsmStatement;
- https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html Assembler instructions with D expression operands.
- classCompoundAsmStatement: dmd.statement.CompoundStatement;
- a complete asm {} block
- classImportStatement: dmd.statement.Statement;
Copyright © 1999-2022 by the D Language Foundation | Page generated by
Ddoc on (no date time)