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.
		
	dmd.init
Defines initializers of variables, e.g. the array literal in int[3] x = [0, 1, 2].
Authors: 
License: 
Source init.d
Documentation https://dlang.org/phobos/dmd_init.html
- classInitializer: dmd.ast_node.ASTNode;
- 
- boolsemanticDone;
- initializerSemantic has been run on this
 
- classVoidInitializer: dmd.init.Initializer;
- classDefaultInitializer: dmd.init.Initializer;
- The C23 default initializer { }
- classErrorInitializer: dmd.init.Initializer;
- classStructInitializer: dmd.init.Initializer;
- classArrayInitializer: dmd.init.Initializer;
- classExpInitializer: dmd.init.Initializer;
- structDesignator;
- Holds the designator for C initializers- Expressionexp;
- [ constant-expression ]
- Identifierident;
- . identifier
 
- structDesigInit;
- Holds the designation (opt) initializer for C initializers- Designators*designatorList;
- designation (opt)
- Initializerinitializer;
- initializer
 
- classCInitializer: dmd.init.Initializer;
- C11 6.7.9 Initialization Represents the C initializer-list- DesigInitsinitializerList;
- initializer-list
- Typetype;
- type that array will be used to initialize
 
- InitializersyntaxCopy(Initializerinx);
- Copy the AST for Initializer.Parameters:Initializer inxInitializer AST to copy Returns:the copy
- ResultVisitInitializer(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 initInitializer tree to traverse Returns:Result.init for continue, value of type Result for early exit
- pure @safe stringvisitCase(stringhandler);
- CTFE-only helper function for VisitInitializer.Parameters:string handlerstring for the name of the visit handler Returns:boilerplate code for a case
Copyright © 1999-2025 by the D Language Foundation | Page generated by
Ddoc on Mon Mar 31 10:27:56 2025