diff trunk/src/Lexer.d @ 35:c470b9356e35

- Added code for parsing Unordered, UorE, UorG, UorGorE, UorL, UorLorE, NotEqual and Not tokens.
author aziz
date Tue, 26 Jun 2007 07:57:00 +0000
parents 41dad4aef4b1
children 3c7210a722f7
line wrap: on
line diff
--- a/trunk/src/Lexer.d	Mon Jun 25 19:05:01 2007 +0000
+++ b/trunk/src/Lexer.d	Tue Jun 26 07:57:00 2007 +0000
@@ -390,6 +390,47 @@
 
       switch(c)
       {
+      case '!':
+        c = *++p;
+        switch (c)
+        {
+        case '<':
+          c = *++p;
+          if (c == '>')
+          {
+            if (p[1] == '=') {
+              ++p;
+              t.type = TOK.Unordered;
+            }
+            else
+              t.type = TOK.UorE;
+          }
+          else if (c == '=')
+          {
+            t.type = TOK.UorG;
+          }
+          else {
+            t.type = TOK.UorGorE;
+            goto Lcommon2;
+          }
+          goto Lcommon;
+        case '>':
+          if (p[1] == '=')
+          {
+            ++p;
+            t.type = TOK.UorL;
+          }
+          else
+            t.type = TOK.UorLorE;
+          goto Lcommon;
+        case '=':
+          t.type = TOK.NotEqual;
+          goto Lcommon;
+        default:
+          t.type = TOK.Not;
+          goto Lcommon2;
+        }
+        assert(0);
       case '.':
         if (p[1] == '.')
         {