diff trunk/src/main.d @ 672:d422e5f2f3ea

Added '--asttable' option to command 'statistics'.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Fri, 18 Jan 2008 00:30:14 +0100
parents d8c32113afde
children c4e3a34e40f1
line wrap: on
line diff
--- a/trunk/src/main.d	Thu Jan 17 22:57:36 2008 +0100
+++ b/trunk/src/main.d	Fri Jan 18 00:30:14 2008 +0100
@@ -143,12 +143,15 @@
   case "stats", "statistics":
     char[][] filePaths;
     bool printTokensTable;
+    bool printNodesTable;
     foreach (arg; args[2..$])
-      if (arg == "--table")
+      if (arg == "--toktable")
         printTokensTable = true;
+      else if (arg == "--asttable")
+        printNodesTable = true;
       else
         filePaths ~= arg;
-    cmd.Statistics.execute(filePaths, printTokensTable);
+    cmd.Statistics.execute(filePaths, printTokensTable, printNodesTable);
     break;
   case "tok", "tokenize":
     char[] filePath;
@@ -324,7 +327,8 @@
   dil stat file.d [file2.d, ...] [Options]
 
 Options:
-  --table         : print the count of all types of tokens in a table.
+  --toktable      : print the count of all kinds of tokens in a table.
+  --asttable      : print the count of all kinds of nodes in a table.
 
 Example:
   dil stat src/dil/Parser.d src/dil/Lexer.d";