# dmd.init

Defines initializers of variables, e.g. the array literal in `int[3] x = [0, 1, 2]`.

#### Authors

Walter Bright

#### License

Boost License 1.0

Source: init.d

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

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

- `Initializer`

  #### Declaration

  `class `Initializer`: dmd.ast_node.ASTNode;`

- `VoidInitializer`

  #### Declaration

  `class `VoidInitializer`: dmd.init.Initializer;`

- `ErrorInitializer`

  #### Declaration

  `class `ErrorInitializer`: dmd.init.Initializer;`

- `StructInitializer`

  #### Declaration

  `class `StructInitializer`: dmd.init.Initializer;`

- `ArrayInitializer`

  #### Declaration

  `class `ArrayInitializer`: dmd.init.Initializer;`

- `ExpInitializer`

  #### Declaration

  `class `ExpInitializer`: dmd.init.Initializer;`

- `Designator`

  #### Declaration

  `struct `Designator`;`

  Holds the `designator` for C initializers

  - `exp`

    #### Declaration

    `Expression `exp`;`

    [ constant-expression ]

  - `ident`

    #### Declaration

    `Identifier `ident`;`

    . identifier

- `DesigInit`

  #### Declaration

  `struct `DesigInit`;`

  Holds the `designation (opt) initializer` for C initializers

  - `designatorList`

    #### Declaration

    `Designators* `designatorList`;`

    designation (opt)

  - `initializer`

    #### Declaration

    `Initializer `initializer`;`

    `initializer`

- `CInitializer`

  #### Declaration

  `class `CInitializer`: dmd.init.Initializer;`

  C11 6.7.9 Initialization Represents the C initializer-list

  - `initializerList`

    #### Declaration

    `DesigInits `initializerList`;`

    initializer-list

  - `type`

    #### Declaration

    `Type `type`;`

    `type` that array will be used to initialize

  - `sem`

    #### Declaration

    `bool `sem`;`

    `true` if semantic() is run

- `syntaxCopy`

  #### Declaration

  `Initializer `syntaxCopy`(Initializer `inx`);`

  Copy the AST for Initializer.

  #### Parameters

  `Initializer `inx`` | Initializer AST to copy

  #### Return Value

  the copy