changeset 23:1a7903701a3d

- Added code for parsing OrAssign, OrLogical and OrBinary tokens.
author aziz
date Sun, 24 Jun 2007 11:13:01 +0000
parents b05fff8e2ce4
children 903f91163f23
files trunk/src/Lexer.d trunk/src/Token.d
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/Lexer.d	Sun Jun 24 11:02:05 2007 +0000
+++ b/trunk/src/Lexer.d	Sun Jun 24 11:13:01 2007 +0000
@@ -275,6 +275,15 @@
         else
           t.type = TOK.Dot;
         goto Lcommon;
+      case '|':
+        c = *++p;
+        if (c == '=')
+          t.type = TOK.OrAssign;
+        else if (c == '|')
+          t.type = TOK.OrLogical;
+        else
+          t.type = TOK.OrBinary;
+        goto Lcommon;
       case '(':
         t.type = TOK.LParen;
         goto Lcommon;
--- a/trunk/src/Token.d	Sun Jun 24 11:02:05 2007 +0000
+++ b/trunk/src/Token.d	Sun Jun 24 11:13:01 2007 +0000
@@ -28,6 +28,8 @@
 
   Dot, Slice, Ellipses,
 
+  OrAssign, OrLogical, OrBinary,
+
   Colon,
   Semicolon,
   Question,