Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.


Does the semantic 1 pass on the AST, which looks at symbol declarations but not initializers or function bodies.

Source dsymbolsem.d

void dsymbolSemantic(Dsymbol dsym, Scope* sc);
Does semantic analysis on the public face of declarations.
AlignDeclaration getAlignment(AlignDeclaration ad, Scope* sc);
Determine the numerical value of the AlignmentDeclaration
AlignDeclaration ad AlignmentDeclaration
Scope* sc context
ad with alignment value determined
Expression resolveAliasThis(Scope* sc, Expression e, bool gag = false, bool findOnly = false);
Find the alias this symbol of e's type.
Scope* sc context
Expression e expression forming the this
bool gag do not print errors, return null instead
bool findOnly don't do further processing like resolving properties, i.e. just return plain dotExp() result.
Expression that is e.aliasthis
void addEnumMembersToSymtab(EnumDeclaration ed, Scope* sc, ScopeDsymbol sds);
Add members of EnumDeclaration to the symbol table(s).
EnumDeclaration ed EnumDeclaration
Scope* sc context of ed
ScopeDsymbol sds symbol table that ed resides in
bool determineFields(AggregateDeclaration ad);
Find all instance fields in ad, then push them into fields.
Runs semantic() for all instance field variables, but also the field types can remain yet not resolved forward references, except direct recursive definitions. After the process sizeok is set to Sizeok.fwd.
AggregateDeclaration ad the AggregateDeclaration to examine
false if any errors occur.
Loc adjustLocForMixin(const(char)[] input, const ref Loc loc, ref Output mixinOut);
Set up loc for a parse of a mixin. Append the input text to the mixin.
const(char)[] input mixin text
Loc loc location to adjust
Output mixinOut sink for mixin text data
adjusted loc suitable for Parser
void checkPrintfScanfSignature(FuncDeclaration funcdecl, TypeFunction f, Scope* sc);
Check signature of pragma(printf) function, print error if invalid.
printf/scanf-like functions must be of the form: extern (C/C++) T printf([parameters...], const(char)* format, ...); or: extern (C/C++) T vprintf([parameters...], const(char)* format, va_list);
FuncDeclaration funcdecl function to check
TypeFunction f function type
Scope* sc scope
Dsymbol search(Dsymbol d, const ref Loc loc, Identifier ident, SearchOptFlags flags = SearchOpt.all);
Search for ident as member of d.
Dsymbol d dsymbol where ident is searched for
Loc loc location to print for error messages
Identifier ident identifier to search for
SearchOptFlags flags search options
null if not found
void setScope(Dsymbol d, Scope* sc);
Set scope for future semantic analysis so we can deal better with forward references.
Dsymbol d dsymbol for which the scope is set
Scope* sc scope that is used to set the value
bool load(Import imp, Scope* sc);
Load module.
true for errors, false for success