changeset 237:805796880adb

- Fix in parseIfStatement(): require(T.Assign) must be encompassed by a try_() call.
author aziz
date Fri, 27 Jul 2007 16:03:00 +0000
parents e961d1b957c3
children f3c6c15961bb
files trunk/src/Parser.d
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/Parser.d	Fri Jul 27 15:37:05 2007 +0000
+++ b/trunk/src/Parser.d	Fri Jul 27 16:03:00 2007 +0000
@@ -1672,13 +1672,15 @@
     else
     {
       // Declarator = Expression
-      bool success;
-      type = try_(parseDeclarator(ident), success);
-      if (success)
+      Type parseDeclaratorAssign()
       {
+        auto type = parseDeclarator(ident);
         require(T.Assign);
+        return type;
       }
-      else
+      bool success;
+      type = try_(parseDeclaratorAssign(), success);
+      if (!success)
       {
         type = null;
         ident = null;