# dmd.dsymbolsem

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

#### Authors

Walter Bright

#### License

Boost License 1.0

Source: dsymbolsem.d

Documentation: https://dlang.org/phobos/dmd_dsymbolsem.html

Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dsymbolsem.d

- `dsymbolSemantic`

  #### Declaration

  `void `dsymbolSemantic`(Dsymbol `dsym`, Scope* `sc`);`

  Does semantic analysis on the public face of declarations.

- `getAlignment`

  #### 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

- `addEnumMembers`

  #### Declaration

  `void `addEnumMembers`(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

- `determineFields`

  #### 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.