# HG changeset patch # User aziz # Date 1185482524 0 # Node ID 8883c113c2f1f78315ecb63430c361488ddfae0f # Parent f838a37a25bd3268cc19fd10ce86022f7955f0b6 - Fix: case T.Identity should be T.Is. - Fix in parseUnaryExpression(): need to call try_() in case T.LParen. diff -r f838a37a25bd -r 8883c113c2f1 trunk/src/Parser.d --- a/trunk/src/Parser.d Thu Jul 26 18:59:02 2007 +0000 +++ b/trunk/src/Parser.d Thu Jul 26 20:42:04 2007 +0000 @@ -2333,7 +2333,7 @@ nT(); operator = T.NotIdentity; goto LNotIdentity; - case T.Identity: + case T.Is: operator = T.Identity; LNotIdentity: nT(); @@ -2447,12 +2447,23 @@ break; case T.LParen: // ( Type ) . Identifier - auto type = parseType(); - require(T.RParen); - require(T.Dot); - string ident = requireIdentifier(); - e = new TypeDotIdExpression(type, ident); - break; + Type parseType_() + { + nT(); + auto type = parseType(); + require(T.RParen); + return type; + } + bool success; + auto type = try_(parseType_(), success); + if (success) + { + require(T.Dot); + string ident = requireIdentifier(); + e = new TypeDotIdExpression(type, ident); + break; + } + goto default; default: e = parsePostExpression(parsePrimaryExpression()); break;