Mercurial > projects > dil
diff trunk/src/Parser.d @ 248:63a15b082c0c
- Removed class SpecializationType.
- Changed type of member specType to Type. Added members opTok and specTok.
- Changed parser of IsExpression to accomodate above changes.
author | aziz |
---|---|
date | Wed, 01 Aug 2007 14:57:05 +0000 |
parents | 11a67ec83281 |
children | 32d354584b28 |
line wrap: on
line diff
--- a/trunk/src/Parser.d Wed Aug 01 13:06:00 2007 +0000 +++ b/trunk/src/Parser.d Wed Aug 01 14:57:05 2007 +0000 @@ -2945,16 +2945,16 @@ case T.Is: requireNext(T.LParen); - Type type; - SpecializationType specType; + Type type, specType; string ident; // optional Identifier + Token* opTok, specTok; type = parseDeclarator(ident, true); switch (token.type) { case T.Colon, T.Equal: - TOK specTok = token.type; + opTok = token; nT(); switch (token.type) { @@ -2968,16 +2968,16 @@ T.Delegate, T.Super, T.Return: + specTok = token; nT(); - specType = new SpecializationType(specTok, token.type); break; default: - specType = new SpecializationType(specTok, parseType()); + specType = parseType(); } default: } require(T.RParen); - e = new IsExpression(type, ident, specType); + e = new IsExpression(type, ident, opTok, specTok, specType); break; case T.LParen: if (tokenAfterParenIs(T.LBrace))