Parse the 'not' keyword in if as TOKEN_IDENT

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-25 19:20:00 +01:00
parent ca033e5acd
commit 55aa53beca

View file

@ -1701,7 +1701,7 @@ static bool parse_if(parser_t *parser, ast_block *block, ast_expression **out)
parseerror(parser, "expected condition or 'not'");
return false;
}
if (parser->tok == TOKEN_KEYWORD && !strcmp(parser_tokval(parser), "not")) {
if (parser->tok == TOKEN_IDENT && !strcmp(parser_tokval(parser), "not")) {
ifnot = true;
if (!parser_next(parser)) {
parseerror(parser, "expected condition in parenthesis");