Mercurial > projects > dil
diff trunk/src/Parser.d @ 168:fbbb2434bf6b
- Simplified parseForStatement().
author | aziz |
---|---|
date | Sat, 14 Jul 2007 09:01:05 +0000 |
parents | 141b908e32b6 |
children | 4666a05dfacf |
line wrap: on
line diff
--- a/trunk/src/Parser.d Fri Jul 13 23:24:05 2007 +0000 +++ b/trunk/src/Parser.d Sat Jul 14 09:01:05 2007 +0000 @@ -1277,26 +1277,14 @@ Expression condition, increment; if (token.type != T.Semicolon) - { init = parseNoScopeStatement(); - require(T.Semicolon); - } - else - nT(); + require(T.Semicolon); if (token.type != T.Semicolon) - { condition = parseExpression(); - require(T.Semicolon); - } - else - nT(); + require(T.Semicolon); if (token.type != T.RParen) - { increment = parseExpression(); - require(T.RParen); - } - else - nT(); + require(T.RParen); forBody = parseScopeStatement(); return new ForStatement(init, condition, increment, forBody); }