dmd.init
Defines initializers of variables, e.g. the array literal in int[3] x = [0, 1, 2]
.
License
Source: init.d
Documentation: https://dlang.org/phobos/dmd_init.html
-
Declaration
class
Initializer
: dmd.ast_node.ASTNode; -
Declaration
class
VoidInitializer
: dmd.init.Initializer; -
Declaration
class
ErrorInitializer
: dmd.init.Initializer; -
Declaration
class
StructInitializer
: dmd.init.Initializer; -
Declaration
class
ArrayInitializer
: dmd.init.Initializer; -
Declaration
class
ExpInitializer
: dmd.init.Initializer; -
Declaration
struct
Designator
; -
Declaration
struct
DesigInit
;Holds the
designation (opt) initializer
for C initializers-
Declaration
Designators*
designatorList
;designation (opt)
-
Declaration
Initializer
initializer
;initializer
-
-
Declaration
class
CInitializer
: dmd.init.Initializer;C11 6.7.9 Initialization Represents the C initializer-list
-
Declaration
DesigInits
initializerList
;initializer-list
-
Declaration
Type
type
;type
that array will be used to initialize -
Declaration
bool
sem
;true
if semantic() is run
-
-
Declaration
Initializer
syntaxCopy
(Initializerinx
);Copy the AST for Initializer.
Parameters
Initializer
inx
Initializer AST to copy
Return Value
the copy
-
Declaration
Result
VisitInitializer
(Result)(Initializerinit
);Visit each Initializer in
init
. Call a function visit%s(init
) for each node, where %s is the op of the node. Otherwise call visitDefault(init
) for that node. If the visit function returns R.init
, continue visiting each node, otherwise return the value of R.Parameters
Result
return type
Initializer
init
Initializer tree to traverse
Return Value
Result.
init
for continue, value of type Result for early exit -
Declaration
pure @safe string
visitCase
(stringhandler
);CTFE-only helper function for VisitInitializer.
Parameters
string
handler
string for the name of the visit
handler
Return Value
boilerplate code for a case