Mercurial > projects > dil
changeset 90:a02950cb7036
- Fixed order of parsing unary, post and primary expressions.
author | aziz |
---|---|
date | Thu, 05 Jul 2007 21:20:01 +0000 |
parents | 18c71269fb52 |
children | ac8610aaf622 |
files | trunk/src/Parser.d |
diffstat | 1 files changed, 4 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/Parser.d Thu Jul 05 21:07:05 2007 +0000 +++ b/trunk/src/Parser.d Thu Jul 05 21:20:01 2007 +0000 @@ -272,14 +272,8 @@ return new Expression(); } - Expression parseUnaryExpression() + Expression parsePostExpression(Expression e) { - return parsePostExpression(); - } - - Expression parsePostExpression() - { - auto e = parsePreExpression(); while (1) { switch (token.type) @@ -335,7 +329,7 @@ return e; } - Expression parsePreExpression() + Expression parseUnaryExpression() { Expression e; switch (token.type) @@ -378,7 +372,7 @@ // parse ( Type ) . Identifier break; default: - e = parsePrimaryExpression(); + e = parsePostExpression(parsePrimaryExpression()); break; } assert(e !is null); @@ -550,6 +544,7 @@ e = new TypeDotIdExpression(type, ident); default: +// error(); } return e; }