diff trunk/src/main.d @ 800:dcd30b0ba711

Added --xml option to command 'ddoc'.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sat, 01 Mar 2008 17:58:23 +0100
parents c24be8d4f6ab
children
line wrap: on
line diff
--- a/trunk/src/main.d	Sat Mar 01 18:04:29 2008 +0200
+++ b/trunk/src/main.d	Sat Mar 01 17:58:23 2008 +0100
@@ -108,6 +108,7 @@
     auto macroPaths = GlobalSettings.ddocFilePaths;
     char[][] filePaths;
     bool incUndoc;
+    bool writeXML;
     bool verbose;
     // Parse arguments.
     auto context = newCompilationContext();
@@ -115,6 +116,8 @@
     {
       if (parseDebugOrVersion(arg, context))
       {}
+      else if (arg == "--xml")
+        writeXML = true;
       else if (arg == "-i")
         incUndoc = true;
       else if (arg == "-v")
@@ -127,7 +130,8 @@
 
     infoMan = new InfoManager();
     // Execute command.
-    cmd.DDoc.execute(filePaths, destination, macroPaths, incUndoc, verbose, context, infoMan);
+    cmd.DDoc.execute(filePaths, destination, macroPaths, writeXML,
+                     incUndoc, verbose, context, infoMan);
     infoMan.hasInfo && printErrors(infoMan);
     break;
   case "gen", "generate":
@@ -303,6 +307,9 @@
   case "?", "help":
     printHelp(args.length >= 3 ? args[2] : "");
     break;
+  // case "typerules":
+  //   genHTMLTypeRulesTables();
+  //   break;
   default:
   }
 }
@@ -448,6 +455,7 @@
   Files with the extension .ddoc are recognized as macro definition files.
 
 Options:
+  --xml            : write XML instead of HTML documents
   -i               : include undocumented symbols
   -v               : verbose output