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.statementsem
Does semantic analysis for statements.
Specification Statements
Authors:
License:
Source statementsem.d
Documentation https://dlang.org/phobos/dmd_statementsem.html
- bool
throwSemantic
(const ref Locloc
, ref Expressionexp
, Scope*sc
); - Run semantic on throw <
exp
>.Parameters:Loc loc
location of the throw Expression exp
value to be thrown Scope* sc
enclosing scope Returns:true if the throw is valid, or false if an error was found - Statement
scopeCode
(Statementstatement
, Scope*sc
, out Statementsentry
, out Statementsexception
, out Statementsfinally
); - If
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:Statement statement
the statement Scope* sc
context Statement sentry
set to code executed upon entry to the scope Statement sexception
set to code executed upon exit from the scope via exception Statement sfinally
set to code executed in finally block Returns:code to be run in the finally clause - auto
makeTupleForeach
(Scope*sc
, boolisStatic
, boolisDecl
, ForeachStatementfs
, Dsymbols*dbody
, boolneedExpansion
); - Type check and unroll foreach over an expression tuple as well as static foreach statements and static foreach declarations. For static foreach statements and `static foreach` declarations, the visitor interface is used (and the result is written into the result field.) For `static foreach` declarations, the resulting Dsymbols* are returned directly.The unrolled body is wrapped into a
- UnrolledLoopStatement, for foreach over an expression tuple.
- ForwardingStatement, for static foreach statements.
- ForwardingAttribDeclaration, for static foreach declarations.
- bool
checkLabel
(GotoStatementgs
); - Check for skipped variable declarations.Parameters:
GotoStatement gs
statement to check Returns:true for error
Copyright © 1999-2024 by the D Language Foundation | Page generated by
Ddoc on Sun Nov 17 01:06:42 2024