# HG changeset patch # User aziz # Date 1185980225 0 # Node ID 63a15b082c0c5e19012282d2a1cda5854e1d9b78 # Parent 11a67ec83281fa58a6d2a8e70a7a7ff0b7905609 - Removed class SpecializationType. - Changed type of member specType to Type. Added members opTok and specTok. - Changed parser of IsExpression to accomodate above changes. diff -r 11a67ec83281 -r 63a15b082c0c trunk/src/Expressions.d --- a/trunk/src/Expressions.d Wed Aug 01 13:06:00 2007 +0000 +++ b/trunk/src/Expressions.d Wed Aug 01 14:57:05 2007 +0000 @@ -590,11 +590,14 @@ { Type type; string ident; - SpecializationType specType; - this(Type type, string ident, SpecializationType specType) + Token* opTok, specTok; + Type specType; + this(Type type, string ident, Token* opTok, Token* specTok, Type specType) { this.type = type; this.ident = ident; + this.opTok = opTok; + this.specTok = specTok; this.specType = specType; } } diff -r 11a67ec83281 -r 63a15b082c0c trunk/src/Parser.d --- 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)) diff -r 11a67ec83281 -r 63a15b082c0c trunk/src/Types.d --- a/trunk/src/Types.d Wed Aug 01 13:06:00 2007 +0000 +++ b/trunk/src/Types.d Wed Aug 01 14:57:05 2007 +0000 @@ -195,7 +195,6 @@ Identifier, Typeof, TemplateInstance, - Specialization, } class Type : Node @@ -339,28 +338,6 @@ } } -class SpecializationType : Type -{ - TOK specTok; // Colon|Equal - Type type; - TOK tokType; // Typedef|Struct|Union|Class|Interface| - // Enum|Function|Delegate|Super|Return - - this(TOK specTok, TOK tokType) - { - super(TID.Specialization, null); - this.specTok = specTok; - this.tokType = tokType; - } - - this(TOK specTok, Type type) - { - super(TID.Specialization, null); - this.specTok = specTok; - this.type = type; - } -} - class FunctionType : Type { Type returnType;