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`:
The wrapped statement.
The symbol containing the static foreach variables.
Do syntax copy of an array of Statement's.
Determine if an enclosed break would apply to this statement, such as if it is a loop or switch statement.
Determine if an enclosed continue would apply to this statement, such as if it is a loop statement.
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 out the scope by presenting the statement as an array of statements.
Find last statement in a sequence of statements.
Support Visitor Pattern
Does this statement end with a return statement?
A cheaper method of doing downcasting of Statements.
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