changeset 223:043722eed46e

- Fix: if-statements should be while-statements.
author aziz
date Thu, 26 Jul 2007 18:54:01 +0000
parents 4f31e4671e06
children f838a37a25bd
files trunk/src/Lexer.d trunk/src/Parser.d
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/Lexer.d	Thu Jul 26 18:14:02 2007 +0000
+++ b/trunk/src/Lexer.d	Thu Jul 26 18:54:01 2007 +0000
@@ -593,6 +593,7 @@
           encodeUTF8(buffer, d);
           continue;
         }
+        // Copy ASCII character.
         buffer ~= *p++;
       }
     }
--- a/trunk/src/Parser.d	Thu Jul 26 18:14:02 2007 +0000
+++ b/trunk/src/Parser.d	Thu Jul 26 18:54:01 2007 +0000
@@ -2270,7 +2270,7 @@
   {
     alias parseAndAndExpression parseNext;
     auto e = parseNext();
-    if (token.type == T.OrLogical)
+    while (token.type == T.OrLogical)
     {
       nT();
       e = new OrOrExpression(e, parseNext());
@@ -2282,7 +2282,7 @@
   {
     alias parseOrExpression parseNext;
     auto e = parseNext();
-    if (token.type == T.AndLogical)
+    while (token.type == T.AndLogical)
     {
       nT();
       e = new AndAndExpression(e, parseNext());
@@ -2294,7 +2294,7 @@
   {
     alias parseXorExpression parseNext;
     auto e = parseNext();
-    if (token.type == T.OrBinary)
+    while (token.type == T.OrBinary)
     {
       nT();
       e = new OrExpression(e, parseNext());
@@ -2306,7 +2306,7 @@
   {
     alias parseAndExpression parseNext;
     auto e = parseNext();
-    if (token.type == T.Xor)
+    while (token.type == T.Xor)
     {
       nT();
       e = new XorExpression(e, parseNext());
@@ -2318,7 +2318,7 @@
   {
     alias parseCmpExpression parseNext;
     auto e = parseNext();
-    if (token.type == T.AndBinary)
+    while (token.type == T.AndBinary)
     {
       nT();
       e = new AndExpression(e, parseNext());