Scope

Undocumented in source.

Members

Functions

detach
void detach()

Similar to pop(), but the results in this are not folded into enclosing.

getClassScope
ClassDeclaration getClassScope()

Search enclosing scopes for ClassDeclaration.

getStructClassScope
AggregateDeclaration getStructClassScope()

Search enclosing scopes for ClassDeclaration.

isDeprecated
bool isDeprecated()

Checks whether the current scope (or any of its parents) is deprecated.

merge
void merge(Loc loc, CtorFlow ctorflow)

Merge results of ctorflow into this.

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

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.

Static functions

search_correct_C
const(char)* search_correct_C(Identifier ident)

Maybe ident was a C or C++ name. Check for that, and suggest the D equivalent.

Static variables

freelist
Scope* freelist;

do not set wasRead for it

Variables

_module
Module _module;

Root module

aliasAsg
AliasDeclaration aliasAsg;

if set, then aliasAsg is being assigned a new value,

aligndecl
AlignDeclaration aligndecl;

alignment for struct members

anchorCounts
uint[void*] anchorCounts;

lookup duplicate anchor name count

callsc
Scope* callsc;

used for __FUNCTION__, __PRETTY_FUNCTION__ and __MODULE__

cppmangle
CPPMANGLE cppmangle;

mangle type

ctorflow
CtorFlow ctorflow;

flow analysis for constructors

depdecl
DeprecatedDeclaration depdecl;

customized deprecation message

enclosing
Scope* enclosing;

enclosing Scope

explicitVisibility
int explicitVisibility;

set if in an explicit visibility attribute

fes
ForeachStatement fes;

if nested function for ForeachStatement, this is it

func
FuncDeclaration func;

function we are in

inLoop
bool inLoop;

true if inside a loop (where constructor calls aren't allowed)

inlining
PragmaDeclaration inlining;

inlining strategy for functions

intypeof
int intypeof;

in typeof(exp)

inunion
Dsymbol inunion;

!= null if processing members of a union

lastVar
VarDeclaration lastVar;

Previous symbol used to prevent goto-skips-init

lastdc
DocComment* lastdc;

documentation comment for last symbol at this scope

linkage
LINK linkage;

linkage for external functions

minst
Module minst;

root module where the instantiated templates should belong to

namespace
CPPNamespaceDeclaration namespace;

C++ namespace this symbol is in

nofree
bool nofree;

true if shouldn't free it

os
ScopeGuardStatement os;

enclosing scope(xxx) statement

parent
Dsymbol parent;

parent to use

prevAnchor
Identifier prevAnchor;

qualified symbol name of last doc anchor

sbreak
Statement sbreak;

enclosing statement that supports "break"

scontinue
Statement scontinue;

enclosing statement that supports "continue"

scopesym
ScopeDsymbol scopesym;

current symbol

slabel
LabelStatement slabel;

enclosing labelled statement

stc
StorageClass stc;

storage class

sw
SwitchStatement sw;

enclosing switch statement

tf
TryFinallyStatement tf;

enclosing try finally statement

tinst
TemplateInstance tinst;

enclosing template instance

tryBody
Statement tryBody;

enclosing _body of TryCatchStatement or TryFinallyStatement

visibility
Visibility visibility;

visibility for class members

Suggestion Box / Bug Report