Mercurial > projects > dil
comparison trunk/src/main.d @ 740:f3dead0310ce
Added '-v' (verbose) option to command 'ddoc'.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sat, 09 Feb 2008 15:10:13 +0100 |
parents | f88b5285b86b |
children | 7173ece1b696 |
comparison
equal
deleted
inserted
replaced
739:49fe21aa387c | 740:f3dead0310ce |
---|---|
90 | 90 |
91 auto destination = args[2]; | 91 auto destination = args[2]; |
92 auto macroPaths = GlobalSettings.ddocFilePaths; | 92 auto macroPaths = GlobalSettings.ddocFilePaths; |
93 char[][] filePaths; | 93 char[][] filePaths; |
94 bool incUndoc; | 94 bool incUndoc; |
95 bool verbose; | |
95 // Parse arguments. | 96 // Parse arguments. |
96 foreach (arg; args[3..$]) | 97 foreach (arg; args[3..$]) |
97 { | 98 { |
98 if (arg == "-i") | 99 if (arg == "-i") |
99 incUndoc = true; | 100 incUndoc = true; |
101 else if (arg == "-v") | |
102 verbose = true; | |
100 else if (arg.length > 5 && toLower(arg[$-4..$].dup) == "ddoc") | 103 else if (arg.length > 5 && toLower(arg[$-4..$].dup) == "ddoc") |
101 macroPaths ~= arg; | 104 macroPaths ~= arg; |
102 else | 105 else |
103 filePaths ~= arg; | 106 filePaths ~= arg; |
104 } | 107 } |
105 | 108 |
106 auto infoMan = new InfoManager(); | 109 auto infoMan = new InfoManager(); |
107 // Execute command. | 110 // Execute command. |
108 cmd.DDoc.execute(filePaths, destination, macroPaths, incUndoc, infoMan); | 111 cmd.DDoc.execute(filePaths, destination, macroPaths, incUndoc, verbose, infoMan); |
109 if (infoMan.info.length) | 112 if (infoMan.info.length) |
110 return printErrors(infoMan); | 113 return printErrors(infoMan); |
111 break; | 114 break; |
112 case "gen", "generate": | 115 case "gen", "generate": |
113 char[] fileName; | 116 char[] fileName; |
346 Destination is the folder where the documentation files are written to. | 349 Destination is the folder where the documentation files are written to. |
347 Files with the extension .ddoc are recognized as macro definition files. | 350 Files with the extension .ddoc are recognized as macro definition files. |
348 | 351 |
349 Options: | 352 Options: |
350 -i : include undocumented symbols | 353 -i : include undocumented symbols |
354 -v : verbose output | |
351 | 355 |
352 Example: | 356 Example: |
353 dil d doc/ src/main.d mymacros.ddoc -i`; | 357 dil d doc/ src/main.d mymacros.ddoc -i`; |
354 break; | 358 break; |
355 case "gen", "generate": | 359 case "gen", "generate": |