diff trunk/src/dil/lexer/IdTable.d @ 714:140469ecb90e

Added code and applied fixes. Added getDDocText() and isLineComment(). Renamed getDocComments() to getDocTokens(). Fixed it as well. printSymbolTable() is called recursively now. Fixed genAnonymousID().
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Thu, 31 Jan 2008 01:10:30 +0100
parents efa5fcb9aa14
children 5e3ef1b2011c
line wrap: on
line diff
--- a/trunk/src/dil/lexer/IdTable.d	Wed Jan 30 23:23:58 2008 +0100
+++ b/trunk/src/dil/lexer/IdTable.d	Thu Jan 31 01:10:30 2008 +0100
@@ -129,15 +129,16 @@
   +/
 
   static uint anonCount;
-  Identifier* genAnonymousID(char[] str)
+  Identifier* genAnonymousID(char[] prefix)
   {
     ++anonCount;
     auto x = anonCount;
     // Convert count to a string and append it to str.
+    char[] num;
     do
-      str = cast(char)('0' + (x % 10)) ~ str;
+      num = cast(char)('0' + (x % 10)) ~ num;
     while (x /= 10)
-    return Identifier(str, TOK.Identifier);
+    return Identifier(prefix ~ num, TOK.Identifier);
   }
 
   Identifier* genAnonEnumID()