changeset 230:8f1790d16753

- Fix: added missing call to parseDeclaratorSuffx() in parseDeclaration. - Fixed parseForStatement().
author aziz
date Fri, 27 Jul 2007 10:38:05 +0000
parents a88967db063b
children 6846138a0e24
files trunk/src/Parser.d
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/trunk/src/Parser.d	Fri Jul 27 10:12:02 2007 +0000
+++ b/trunk/src/Parser.d	Fri Jul 27 10:38:05 2007 +0000
@@ -332,6 +332,7 @@
         auto funcBody = parseFunctionBody(new FunctionBody);
         return new FunctionDeclaration(ident, type, null, funcBody);
       }
+      type = parseDeclaratorSuffix(type);
     }
 
     // It's a variable declaration.
@@ -1703,7 +1704,8 @@
 
     if (token.type != T.Semicolon)
       init = parseNoScopeStatement();
-    require(T.Semicolon);
+    else
+      nT(); // Skip ;
     if (token.type != T.Semicolon)
       condition = parseExpression();
     require(T.Semicolon);