Mercurial > projects > dil
changeset 199:a95fee6e4b7e
- Fix: parseDeclaration(): appending null to values when no initializer present.
author | aziz |
---|---|
date | Mon, 16 Jul 2007 08:17:04 +0000 |
parents | 88c1777a9e51 |
children | 61f60112ac63 |
files | trunk/src/Parser.d |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/Parser.d Sun Jul 15 21:35:05 2007 +0000 +++ b/trunk/src/Parser.d Mon Jul 16 08:17:04 2007 +0000 @@ -264,7 +264,7 @@ // It's a variable declaration. string[] idents = [ident]; Expression[] values; - goto LenterLoop; + goto LenterLoop; // We've already parsed an identifier. Jump to if statement and check for initializer. while (token.type == T.Comma) { idents ~= requireIdentifier(); @@ -274,6 +274,8 @@ nT(); values ~= parseInitializer(); } + else + values ~= null; } require(T.Semicolon); return new VariableDeclaration(idents, values);