diff trunk/src/dil/lexer/IdentsGenerator.d @ 769:5e3ef1b2011c

Added and improved documentation.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sun, 17 Feb 2008 02:21:55 +0100
parents 1bfae3480fdc
children 9f61e8af55d5
line wrap: on
line diff
--- a/trunk/src/dil/lexer/IdentsGenerator.d	Sat Feb 16 22:10:21 2008 +0100
+++ b/trunk/src/dil/lexer/IdentsGenerator.d	Sun Feb 17 02:21:55 2008 +0100
@@ -11,6 +11,7 @@
   char[] idStr; /// In table.
 }
 
+/// Array of predefined identifiers.
 static const StrPair[] identPairs = [
   // Predefined version identifiers:
   {"DigitalMars"}, {"X86"}, {"X86_64"},
@@ -65,11 +66,12 @@
 ];
 
 /++
-  CTF for generating the members of the struct Ident.
-  The resulting string could look like this:
-  ---
+ CTF for generating the members of the struct Ident.
+
+ The resulting string looks like this:
+ ---
   private struct Ids {static const:
-    Identifier _str = {"str", TOK.Identifier, ID.str};
+    Identifier _str = {"str", TOK.Identifier, IDK.str};
     // more ...
   }
   Identifier* str = &Ids._str;
@@ -78,7 +80,7 @@
     str,
     // more ...
   ]
-  ---
+ ---
 +/
 char[] generateIdentMembers()
 {
@@ -90,7 +92,7 @@
   {
     // N.B.: Compiler cries for some reason when trying to access pair.idStr.
     // Identifier _str = {"str", TOK.Identifier, ID.str};
-    private_members ~= "Identifier _"~pair.str~` = {"`~pair.str~`", TOK.Identifier, ID.`~pair.str~"};\n";
+    private_members ~= "Identifier _"~pair.str~` = {"`~pair.str~`", TOK.Identifier, IDK.`~pair.str~"};\n";
     // Identifier* str = &_str;
     public_members ~= "Identifier* "~pair.str~" = &Ids._"~pair.str~";\n";
     array ~= pair.str~",";
@@ -102,7 +104,7 @@
   return private_members ~ public_members ~ array;
 }
 
-/// CTF for generating the members of the enum ID.
+/// CTF for generating the members of the enum IDK.
 char[] generateIDMembers()
 {
   char[] members;