changeset 21:c785c122e4e6

- Added code for parsing Colon, Semicolon, Question, Comma and Dollar.
author aziz
date Sat, 23 Jun 2007 22:43:02 +0000
parents d6adfbd7c513
children b05fff8e2ce4
files trunk/src/Lexer.d trunk/src/Token.d trunk/src/main.d
diffstat 3 files changed, 24 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/Lexer.d	Sat Jun 23 22:31:02 2007 +0000
+++ b/trunk/src/Lexer.d	Sat Jun 23 22:43:02 2007 +0000
@@ -278,6 +278,22 @@
         goto Lcommon;
       case '}':
         t.type = TOK.RBrace;
+        goto Lcommon;
+      case ':':
+        t.type = TOK.Colon;
+        goto Lcommon;
+      case ';':
+        t.type = TOK.Semicolon;
+        goto Lcommon;
+      case '?':
+        t.type = TOK.Question;
+        goto Lcommon;
+      case ',':
+        t.type = TOK.Comma;
+        goto Lcommon;
+      case '$':
+        t.type = TOK.Dollar;
+        goto Lcommon;
       Lcommon:
         ++p;
         t.end = p;
--- a/trunk/src/Token.d	Sat Jun 23 22:31:02 2007 +0000
+++ b/trunk/src/Token.d	Sat Jun 23 22:43:02 2007 +0000
@@ -25,6 +25,13 @@
   RBracket,
   LBrace,
   RBrace,
+
+  Colon,
+  Semicolon,
+  Question,
+  Comma,
+  Dollar,
+
   EOF
 }
 
--- a/trunk/src/main.d	Sat Jun 23 22:31:02 2007 +0000
+++ b/trunk/src/main.d	Sat Jun 23 22:43:02 2007 +0000
@@ -63,6 +63,7 @@
         writef("<br>%s</br>", span);
       break;
       default:
+        writef("%s", span);
     }
     end = token.end;
   }