File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -2957,14 +2957,19 @@ $(H2 $(LNAME2 main, $(D main()) Function))
2957
2957
It gets called after all the module initializers are run, and
2958
2958
after any unittests are run.
2959
2959
After it returns, all the module destructors are run.
2960
- $(D main()) must be declared using one of the following forms :
2960
+ $(D main()) must be declared as follows :
2961
2961
)
2962
2962
2963
- $(UL
2964
- $(LI `void main() { ... }`)
2965
- $(LI `void main(string[] args) { ... }`)
2966
- $(LI `int main() { ... }`)
2967
- $(LI `int main(string[] args) { ... }`)
2963
+ $(GRAMMAR
2964
+ $(GNAME MainFunction):
2965
+ $(GLINK MainReturnDecl) main $(D $(LPAREN)$(RPAREN)) $(GLINK2 statement, BlockStatement)
2966
+ $(GLINK MainReturnDecl) main $(D $(LPAREN)string[] args$(RPAREN)) $(GLINK2 statement, BlockStatement)
2967
+
2968
+ $(GNAME MainReturnDecl):
2969
+ $(D void)
2970
+ $(D int)
2971
+ $(GLINK2 type, noreturn)
2972
+ $(RELATIVE_LINK2 auto-functions, $(D auto))
2968
2973
)
2969
2974
2970
2975
$(P The main function must have D linkage.)
You can’t perform that action at this time.
0 commit comments