ScopeDsymbol

Dsymbol that generates a scope

Members

Functions

findGetMembers
FuncDeclaration findGetMembers()

Look for member of the form: const(MemberInfo)[] getMembers(string); Returns NULL if not found

hasStaticCtorOrDtor
bool hasStaticCtorOrDtor()

Return true if any of the members are static ctors or static dtors, or if any members have members that are.

search
Dsymbol search(const ref Loc loc, Identifier ident, int flags = SearchLocalsOnly)

This function is #1 on the list of functions that eat cpu time. Be very, very careful about slowing it down.

symtabLookup
Dsymbol symtabLookup(Dsymbol s, Identifier id)

Look up identifier in symbol table.

Static functions

_foreach
int _foreach(Scope* sc, Dsymbols* members, scope ForeachDg dg, size_t* pn = null)

Expands attribute declarations in members in depth first order. Calls dg(size_t symidx, Dsymbol *sym) for each member. If dg returns !=0, stops and returns that value else returns 0. Use this function to avoid the O(N + N^2/2) complexity of calculating dim and calling N times getNth.

Inherited Members

From Dsymbol

cppnamespace
CPPNamespaceDeclaration cppnamespace;

C++ namespace this symbol belongs to

getModule
Module getModule()

Determine which Module a Dsymbol is in.

getAccessModule
Module getAccessModule()

Determine which Module a Dsymbol is in, as far as access rights go.

pastMixin
inout(Dsymbol) pastMixin()

pastMixin returns the enclosing symbol if this is a template mixin.

toParent
inout(Dsymbol) toParent()
toParent2
inout(Dsymbol) toParent2()
toParentDecl
inout(Dsymbol) toParentDecl()
toParentLocal
inout(Dsymbol) toParentLocal()

parent field returns a lexically enclosing scope symbol this is a member of.

toParentP
Dsymbol toParentP(Dsymbol p1, Dsymbol p2 = null)

Returns the declaration scope scope of this unless any of the symbols p1 or p2 resides in its enclosing instantiation scope then the latter is returned.

followInstantiationContext
bool followInstantiationContext(Dsymbol p1, Dsymbol p2 = null)

Returns true if any of the symbols p1 or p2 resides in the enclosing instantiation scope of this.

arraySyntaxCopy
Dsymbols* arraySyntaxCopy(Dsymbols* a)

Do syntax copy of an array of Dsymbol's.

toAlias
Dsymbol toAlias()

If this symbol is really an alias for another, return that other. If needed, semantic() is invoked due to resolve forward reference.

toAlias2
Dsymbol toAlias2()

Resolve recursive tuple expansion in eponymous template.

setScope
void setScope(Scope* sc)

Set scope for future semantic analysis so we can deal better with forward references.

search
Dsymbol search(const ref Loc loc, Identifier ident, int flags = IgnoreNone)

Search for ident as member of s.

searchX
Dsymbol searchX(const ref Loc loc, Scope* sc, RootObject id, int flags)

Search for identifier id as a member of this. id may be a template instance.

size
d_uns64 size(const ref Loc loc)
isMember
inout(AggregateDeclaration) isMember()

Returns an AggregateDeclaration when toParent() is that.

isMember2
inout(AggregateDeclaration) isMember2()

Returns an AggregateDeclaration when toParent2() is that.

isMemberDecl
inout(AggregateDeclaration) isMemberDecl()

Returns an AggregateDeclaration when toParentDecl() is that.

isMemberLocal
inout(AggregateDeclaration) isMemberLocal()

Returns an AggregateDeclaration when toParentLocal() is that.

prot
Prot prot()
syntaxCopy
Dsymbol syntaxCopy(Dsymbol s)

Copy the syntax. Used for template instantiations. If s is NULL, allocate the new object, otherwise fill it in.

oneMember
bool oneMember(Dsymbol* ps, Identifier ident)

Determine if this symbol is only one.

oneMembers
bool oneMembers(Dsymbols* members, Dsymbol* ps, Identifier ident)

Same as Dsymbol::oneMember(), but look at an array of Dsymbols.

hasPointers
bool hasPointers()

Is Dsymbol a variable that contains pointers?

addComment
void addComment(const(char)* comment)

Add documentation comment to Dsymbol. Ignore NULL comments.

inNonRoot
bool inNonRoot()

Returns true if this symbol is defined in a non-root module without instantiation.

accept
void accept(Visitor v)

Meta