# HG changeset patch # User Aziz K?ksal # Date 1196541744 -3600 # Node ID cfb3805768b6b04404cea1a87c3c90764e2553f8 # Parent bccca748d74503ae4e29c504532dbf8c6b59f552 Added DotExpression and DotType. diff -r bccca748d745 -r cfb3805768b6 trunk/src/dil/Expressions.d --- a/trunk/src/dil/Expressions.d Sat Dec 01 20:20:44 2007 +0100 +++ b/trunk/src/dil/Expressions.d Sat Dec 01 21:42:24 2007 +0100 @@ -604,6 +604,15 @@ } } */ + +class DotExpression : Expression +{ + this() + { + mixin(set_kind); + } +} + class DotListExpression : Expression { Expression[] items; diff -r bccca748d745 -r cfb3805768b6 trunk/src/dil/Parser.d --- a/trunk/src/dil/Parser.d Sat Dec 01 20:20:44 2007 +0100 +++ b/trunk/src/dil/Parser.d Sat Dec 01 21:42:24 2007 +0100 @@ -810,9 +810,6 @@ // Pragma: // pragma ( Identifier ) // pragma ( Identifier , ExpressionList ) - // ExpressionList: - // AssignExpression - // AssignExpression , ExpressionList nT(); Token* ident; Expression[] args; @@ -1437,8 +1434,8 @@ Expression[] identList; if (token.type == T.Dot) { - identList ~= set(new IdentifierExpression(token), begin); nT(); + identList ~= set(new DotExpression(), begin); } else if (token.type == T.Typeof) { @@ -1504,8 +1501,8 @@ Type[] identList; if (token.type == T.Dot) { - identList ~= set(new IdentifierType(token), begin); nT(); + identList ~= set(new DotType(), begin); } else if (token.type == T.Typeof) { @@ -1572,8 +1569,8 @@ // This code is similar to parseDotListType(). if (token.type == T.Dot) { - templateIdent ~= set(new IdentifierExpression(token), begin); nT(); + templateIdent ~= set(new DotExpression(), begin); } while (1) diff -r bccca748d745 -r cfb3805768b6 trunk/src/dil/SyntaxTree.d --- a/trunk/src/dil/SyntaxTree.d Sat Dec 01 20:20:44 2007 +0100 +++ b/trunk/src/dil/SyntaxTree.d Sat Dec 01 21:42:24 2007 +0100 @@ -152,6 +152,7 @@ PrimaryExpressio, IdentifierExpression, SpecialTokenExpression, + DotExpression, DotListExpression, TemplateInstanceExpression, ThisExpression, @@ -188,6 +189,7 @@ // Types: IntegralType, UndefinedType, + DotType, DotListType, IdentifierType, TypeofType, diff -r bccca748d745 -r cfb3805768b6 trunk/src/dil/Types.d --- a/trunk/src/dil/Types.d Sat Dec 01 20:20:44 2007 +0100 +++ b/trunk/src/dil/Types.d Sat Dec 01 21:42:24 2007 +0100 @@ -309,6 +309,7 @@ Pointer, CFuncPointer, Array, + Dot, DotList, Identifier, Typeof, @@ -378,6 +379,15 @@ } } +class DotType : Type +{ + this() + { + super(TID.Dot); + mixin(set_kind); + } +} + class TypeofType : Type { Expression e;