diff trunk/src/main.d @ 780:edd217e14736

Using CompilationContext in command 'igraph'.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Wed, 20 Feb 2008 23:13:56 +0100
parents 8e6fed11bb68
children 05dfe88dd3bb
line wrap: on
line diff
--- a/trunk/src/main.d	Wed Feb 20 22:47:33 2008 +0100
+++ b/trunk/src/main.d	Wed Feb 20 23:13:56 2008 +0100
@@ -154,16 +154,18 @@
     break;
   case "importgraph", "igraph":
     string filePath;
-    string[] includePaths;
     string[] regexps;
     string siStyle = "dashed"; // static import style
     string piStyle = "bold";   // public import style
     uint levels;
     IGraphOption options;
+    auto context = newCompilationContext();
     foreach (arg; args[2..$])
     {
-      if (strbeg(arg, "-I"))
-        includePaths ~= arg[2..$];
+      if (parseDebugOrVersion(arg, context))
+      {}
+      else if (strbeg(arg, "-I"))
+        context.importPaths ~= arg[2..$];
       else if(strbeg(arg, "-r"))
         regexps ~= arg[2..$];
       else if(strbeg(arg, "-l"))
@@ -197,7 +199,7 @@
           filePath = arg;
         }
     }
-    cmd.ImportGraph.execute(filePath, includePaths, regexps, levels, siStyle, piStyle, options);
+    cmd.ImportGraph.execute(filePath, context, regexps, levels, siStyle, piStyle, options);
     break;
   case "stats", "statistics":
     char[][] filePaths;