diff trunk/src/Lexer.d @ 22:b05fff8e2ce4

- Added code for parsing Dot, Slice and Ellipses tokens.
author aziz
date Sun, 24 Jun 2007 11:02:05 +0000
parents c785c122e4e6
children 1a7903701a3d
line wrap: on
line diff
--- a/trunk/src/Lexer.d	Sat Jun 23 22:43:02 2007 +0000
+++ b/trunk/src/Lexer.d	Sun Jun 24 11:02:05 2007 +0000
@@ -261,6 +261,20 @@
 
       switch(c)
       {
+      case '.':
+        if (p[1] == '.')
+        {
+          ++p;
+          if (p[1] == '.') {
+            ++p;
+            t.type = TOK.Ellipses;
+          }
+          else
+            t.type = TOK.Slice;
+        }
+        else
+          t.type = TOK.Dot;
+        goto Lcommon;
       case '(':
         t.type = TOK.LParen;
         goto Lcommon;