Mercurial > projects > dil
changeset 369:27767e203d64
- Added override attribute to ImportParser.start().
- Fix in parseTryStatement(): catch parameter can have optional identifier.
- Fix in parseArrayType(): added nested function parseAAType(); AAType must be followed by TOK.RBracket.
author | aziz |
---|---|
date | Sat, 01 Sep 2007 19:58:01 +0000 |
parents | 2adf808343d6 |
children | ae4afb66768f |
files | trunk/src/dil/Parser.d |
diffstat | 1 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/dil/Parser.d Sat Sep 01 11:23:01 2007 +0000 +++ b/trunk/src/dil/Parser.d Sat Sep 01 19:58:01 2007 +0000 @@ -23,7 +23,7 @@ super(srcText, fileName); } - Declarations start() + override Declarations start() { auto decls = new Declarations; super.init(); @@ -2233,7 +2233,7 @@ { nT(); Token* ident; - auto type = parseDeclarator(ident); + auto type = parseDeclarator(ident, true); param = new Parameter(null, type, ident, null); require(T.RParen); } @@ -3635,9 +3635,8 @@ t = new InvariantType(t); set(t, begin); break; - } + } // version(D2) default: - // TODO: issue error msg. error(MID.ExpectedButFound, "BasicType", token.srcText); t = new UndefinedType(); nT(); @@ -3754,7 +3753,13 @@ else { bool success; - auto assocType = try_(parseType(), success); + Type parseAAType() + { + auto type = parseType(); + require(T.RBracket); + return type; + } + auto assocType = try_(parseAAType(), success); if (success) t = new ArrayType(t, assocType); else @@ -3766,8 +3771,8 @@ e2 = parseExpression(); } t = new ArrayType(t, e, e2); + require(T.RBracket); } - require(T.RBracket); } set(t, begin); return t;