diff trunk/src/Lexer.d @ 14:cdf788d8bdaf

- Parsing /= now.
author aziz
date Sat, 23 Jun 2007 13:14:05 +0000
parents e5211758b63c
children c70c028e47dd
line wrap: on
line diff
--- a/trunk/src/Lexer.d	Sat Jun 23 12:22:03 2007 +0000
+++ b/trunk/src/Lexer.d	Sat Jun 23 13:14:05 2007 +0000
@@ -125,8 +125,14 @@
       if (c == '/')
       {
         c = *++p;
-        if (c == '+')
+        switch(c)
         {
+          case '=':
+          ++p;
+          t.type = TOK.DivisionAssign;
+          t.end = p;
+          return;
+          case '+':
           uint level = 1;
           do
           {
@@ -149,9 +155,7 @@
           t.type = TOK.Comment;
           t.end = p;
           return;
-        }
-        else if (c == '*')
-        {
+          case '*':
           do
           {
             c = *++p;
@@ -162,9 +166,7 @@
           t.type = TOK.Comment;
           t.end = p;
           return;
-        }
-        else if (c == '/')
-        {
+          case '/':
           do
           {
             c = *++p;