# HG changeset patch # User aziz # Date 1184366463 0 # Node ID f27a98bb17c77bf5f5499ca7fb19d1b12844c172 # Parent c7b250662c74205f778db97c295bd22946c4eaae - Fix: when parsing Declarator fails, type and ident is set to null. - Added an opEquals method to Token. diff -r c7b250662c74 -r f27a98bb17c7 trunk/src/Parser.d --- a/trunk/src/Parser.d Fri Jul 13 22:31:02 2007 +0000 +++ b/trunk/src/Parser.d Fri Jul 13 22:41:03 2007 +0000 @@ -1196,6 +1196,11 @@ { require(T.Assign); } + else + { + type = null; + ident = null; + } } condition = parseExpression(); require(T.RParen); diff -r c7b250662c74 -r f27a98bb17c7 trunk/src/Token.d --- a/trunk/src/Token.d Fri Jul 13 22:31:02 2007 +0000 +++ b/trunk/src/Token.d Fri Jul 13 22:41:03 2007 +0000 @@ -132,8 +132,12 @@ bool isKeyword() { - if (KeywordsBegin <= type && type <= KeywordsEnd) - return true; - return false; + return KeywordsBegin <= type && type <= KeywordsEnd; } +/+ + int opEquals(TOK type2) + { + return type == type2; + } ++/ } \ No newline at end of file