StaticForeach

Implements common functionality for StaticForeachDeclaration and StaticForeachStatement This performs the necessary lowerings before dmd.statementsem.makeTupleForeach can be used to expand the corresponding static foreach declaration or statement.

Constructors

this
this(Loc loc, ForeachStatement aggrfe, ForeachRangeStatement rangefe)
Undocumented in source.

Members

Functions

prepare
void prepare(Scope* sc)

Perform static foreach lowerings that are necessary in order to finally expand the static foreach using dmd.statementsem.makeTupleForeach.

ready
bool ready()
syntaxCopy
StaticForeach syntaxCopy()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

tupleFieldName
auto tupleFieldName;
Undocumented in source.

Variables

aggrfe
ForeachStatement aggrfe;

* Not null iff the static foreach is over an aggregate. In * this case, it contains the corresponding ForeachStatement. For * StaticForeachDeclaration, the body is null.

loc
Loc loc;
Undocumented in source.
needExpansion
bool needExpansion;

true if it is necessary to expand a tuple into multiple variables (see lowerNonArrayAggregate).

rangefe
ForeachRangeStatement rangefe;

Not null iff the static foreach is over a range. Exactly one of the aggrefe and rangefe fields is not null. See aggrfe field for more details.

Inherited Members

From RootObject

equals
bool equals(RootObject o)
Undocumented in source. Be warned that the author may not have intended to support it.
toChars
const(char)* toChars()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
const(char)[] toString()
dyncast
DYNCAST dyncast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta