changeset 132:c97a3f683d13

- Skipping comments in nT().
author aziz
date Tue, 10 Jul 2007 20:13:04 +0000
parents ce636f3981cc
children 3924b1ee1302
files trunk/src/Parser.d
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/Parser.d	Tue Jul 10 20:11:02 2007 +0000
+++ b/trunk/src/Parser.d	Tue Jul 10 20:13:04 2007 +0000
@@ -28,8 +28,11 @@
 
   void nT()
   {
-    lx.nextToken();
-    token = &lx.token;
+    do
+    {
+      lx.nextToken();
+      token = &lx.token;
+    } while (token.type == T.Comment) // Skip comments
   }
 
   void skipToOnePast(TOK tok)