dmd.dsymbolsem

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

Authors

Walter Bright

Source: dsymbolsem.d

  • Declaration

    void dsymbolSemantic(Dsymbol dsym, Scope* sc);

    Does semantic analysis on the public face of declarations.

  • Declaration

    AlignDeclaration getAlignment(AlignDeclaration ad, Scope* sc);

    Determine the numerical value of the AlignmentDeclaration

    Parameters

    AlignDeclaration ad

    AlignmentDeclaration

    Scope* sc

    context

    Return Value

    ad with alignment value determined

  • Declaration

    void addEnumMembersToSymtab(EnumDeclaration ed, Scope* sc, ScopeDsymbol sds);

    Add members of EnumDeclaration to the symbol table(s).

    Parameters

    EnumDeclaration ed

    EnumDeclaration

    Scope* sc

    context of ed

    ScopeDsymbol sds

    symbol table that ed resides in

  • Declaration

    bool determineFields(AggregateDeclaration ad);

    Find all instance fields in ad, then push them into fields.

    Discussion

    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.

    Parameters

    AggregateDeclaration ad

    the AggregateDeclaration to examine

    Return Value

    false if any errors occur.

  • Declaration

    PINLINE evalPragmaInline(Loc loc, Scope* sc, Expressions* args);

    Interpret a pragma(inline, x)

    Parameters

    Loc loc

    location for error messages

    Scope* sc

    scope for evaluation of argument

    Expressions* args

    pragma arguments

    Return Value

    corresponding PINLINE state

  • Declaration

    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.

    Parameters

    const(char)[] input

    mixin text

    Loc loc

    location to adjust

    Output mixinOut

    sink for mixin text data

    Return Value

    adjusted loc suitable for Parser

  • Declaration

    void checkPrintfScanfSignature(FuncDeclaration funcdecl, TypeFunction f, Scope* sc);

    Check signature of pragma(printf) function, print error if invalid.

    Discussion

    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);

    Parameters

    FuncDeclaration funcdecl

    function to check

    TypeFunction f

    function type

    Scope* sc

    scope