Scope

struct Scope {
Scope* enclosing;
Module _module;
ScopeDsymbol scopesym;
ScopeDsymbol sds;
FuncDeclaration func;
Dsymbol parent;
LabelStatement slabel;
SwitchStatement sw;
TryFinallyStatement tf;
OnScopeStatement os;
Statement sbreak;
Statement scontinue;
ForeachStatement fes;
Scope* callsc;
int inunion;
int nofree;
int noctor;
int intypeof;
VarDeclaration lastVar;
Module minst;
TemplateInstance tinst;
uint callSuper;
uint* fieldinit;
size_t fieldinit_dim;
AlignDeclaration aligndecl;
LINK linkage;
CPPMANGLE cppmangle;
PINLINE inlining;
Prot protection;
int explicitProtection;
StorageClass stc;
DeprecatedDeclaration depdecl;
uint flags;
UserAttributeDeclaration userAttribDecl;
DocComment* lastdc;
uint[void*] anchorCounts;
Identifier prevAnchor;
Scope* freelist;
}

Members

Functions

getClassScope
ClassDeclaration getClassScope()

Search enclosing scopes for ClassDeclaration.

getStructClassScope
AggregateDeclaration getStructClassScope()

Search enclosing scopes for ClassDeclaration.

search
Dsymbol search(Loc loc, Identifier ident, Dsymbol* pscopesym, int flags = IgnoreNone)

Perform unqualified name lookup by following the chain of scopes up until found.

setNoFree
void setNoFree()

For TemplateDeclarations, we need to remember the Scope where it was declared. So mark the Scope as not to be free'd.

Meta