Mercurial > projects > dil
changeset 124:d4c4cea6ee7f
- Renamed method errorIfNot() to expected().
author | aziz |
---|---|
date | Mon, 09 Jul 2007 21:07:03 +0000 |
parents | 0f55c0ac6589 |
children | 240a8b053803 |
files | trunk/src/Parser.d |
diffstat | 1 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/Parser.d Mon Jul 09 21:04:02 2007 +0000 +++ b/trunk/src/Parser.d Mon Jul 09 21:07:03 2007 +0000 @@ -333,7 +333,7 @@ nT(); else if (token.type != T.RBrace) { - errorIfNot(T.RBrace); + expected(T.RBrace); break; } } while (token.type != T.RBrace) @@ -378,7 +378,7 @@ require(T.RBrace); } else - errorIfNot(T.LBrace); // TODO: better error msg + expected(T.LBrace); // TODO: better error msg // TODO: error if decls.length == 0 @@ -418,7 +418,7 @@ // TODO: handle template instantiations: class Foo : Bar!(int) } else - errorIfNot(T.Identifier); + expected(T.Identifier); bases ~= new BaseClass(prot, name); if (token.type != T.Comma) break; @@ -460,7 +460,7 @@ require(T.RBrace); } else - errorIfNot(T.LBrace); // TODO: better error msg + expected(T.LBrace); // TODO: better error msg // TODO: error if decls.length == 0 @@ -503,7 +503,7 @@ require(T.RBrace); } else - errorIfNot(T.LBrace); // TODO: better error msg + expected(T.LBrace); // TODO: better error msg // TODO: error if decls.length == 0 @@ -608,7 +608,7 @@ else if (token.type == T.Identifier) ident = token.identifier; else - errorIfNot(T.Identifier); // TODO: better error msg + expected(T.Identifier); // TODO: better error msg nT(); } @@ -669,7 +669,7 @@ else if (token.type == T.Identifier) ident = token.identifier; else - errorIfNot(T.Identifier); // TODO: better error msg + expected(T.Identifier); // TODO: better error msg nT(); } @@ -1008,7 +1008,7 @@ else if (token.type == T.New) e = parseNewExpression(e); else - errorIfNot(T.Identifier); + expected(T.Identifier); continue; case T.PlusPlus: e = new PostIncrExpression(e); @@ -1151,7 +1151,7 @@ keys ~= parseAssignExpression(); if (token.type != T.Colon) { - errorIfNot(T.Colon); + expected(T.Colon); values ~= null; if (token.type == T.RBracket) break; @@ -1454,7 +1454,7 @@ t = parseDeclaratorSuffix(t); } else if (!identOptional) - errorIfNot(T.Identifier); + expected(T.Identifier); return t; } @@ -1527,7 +1527,7 @@ return params; } - void errorIfNot(TOK tok) + void expected(TOK tok) { if (token.type != tok) error(MID.ExpectedButFound, tok, token.srcText);