StaticForeachDeclaration

Static foreach at declaration scope, like: static foreach (i; [0, 1, 2]){ }

extern (C++) final
class StaticForeachDeclaration : AttribDeclaration {
bool cached;
Dsymbols* cache;
}

Members

Variables

onStack
bool onStack;

include can be called multiple times, but a static foreach should be expanded at most once. Achieved by caching the result of the first call. We need both cached and cache, because null is a valid value for cache.

scopesym
ScopeDsymbol scopesym;

cached enclosing scope (mimics static if declaration)

sfe
StaticForeach sfe;

contains static foreach expansion logic

Inherited Members

From AttribDeclaration

decl
Dsymbols* decl;

Dsymbol's affected by this AttribDeclaration

createNewScope
Scope* createNewScope(Scope* sc, StorageClass stc, LINK linkage, CPPMANGLE cppmangle, Visibility visibility, int explicitVisibility, AlignDeclaration aligndecl, PragmaDeclaration inlining)

Create a new scope if one or more given attributes are different from the sc's. If the returned scope != sc, the caller should pop the scope after it used.

newScope
Scope* newScope(Scope* sc)

A hook point to supply scope for members. addMember, setScope, importAll, semantic, semantic2 and semantic3 will use this.

addObjcSymbols
void addObjcSymbols(ClassDeclarations* classes, ClassDeclarations* categories)

Meta