Mercurial > projects > dil
comparison trunk/src/cmd/Statistics.d @ 797:cf2ad5df025c
Added documentation comments.
Removed Lexer.loadKeywords() and revised Lexer.isReservedIdentifier().
Also removed Lexer.getTokens().
Renamed keywords to g_reservedIds.
Renamed classNames to g_classNames.
Added PRE and DMDBUG macros.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Fri, 29 Feb 2008 22:51:24 +0100 |
parents | 3b34f6a95a27 |
children |
comparison
equal
deleted
inserted
replaced
796:f7688996bf08 | 797:cf2ad5df025c |
---|---|
30 { | 30 { |
31 Statistics s; | 31 Statistics s; |
32 if (allocateTokensTable) | 32 if (allocateTokensTable) |
33 s.tokensTable = new uint[TOK.MAX]; | 33 s.tokensTable = new uint[TOK.MAX]; |
34 if (allocateNodesTable) | 34 if (allocateNodesTable) |
35 s.nodesTable = new uint[classNames.length]; | 35 s.nodesTable = new uint[g_classNames.length]; |
36 return s; | 36 return s; |
37 } | 37 } |
38 | 38 |
39 void opAddAssign(Statistics s) | 39 void opAddAssign(Statistics s) |
40 { | 40 { |
127 { | 127 { |
128 Stdout("Table of nodes:").newline; | 128 Stdout("Table of nodes:").newline; |
129 Stdout.formatln(" {,10} | {}", "Count", "Node kind"); | 129 Stdout.formatln(" {,10} | {}", "Count", "Node kind"); |
130 Stdout("-----------------------------").newline; | 130 Stdout("-----------------------------").newline; |
131 foreach (i, count; total.nodesTable) | 131 foreach (i, count; total.nodesTable) |
132 Stdout.formatln(" {,10} | {}", count, classNames[i]); | 132 Stdout.formatln(" {,10} | {}", count, g_classNames[i]); |
133 Stdout("// End of nodes table.").newline; | 133 Stdout("// End of nodes table.").newline; |
134 } | 134 } |
135 } | 135 } |
136 | 136 |
137 /// Returns the statistics for a D source file. | 137 /// Returns the statistics for a D source file. |