From 22d6ff230970642a5fcce1d0985ac502fbe44b18 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Sun, 11 Nov 2012 18:57:02 +0100 Subject: [PATCH] Fixing lexer to not classify wrong tokens as operators --- lexer.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lexer.c b/lexer.c index 19d6720..a550ed0 100644 --- a/lexer.c +++ b/lexer.c @@ -852,6 +852,7 @@ int lex_do(lex_file *lex) /* single-character tokens */ switch (ch) { + case '[': case '(': if (!lex_tokench(lex, ch) || !lex_endtoken(lex)) @@ -866,14 +867,6 @@ int lex_do(lex_file *lex) case ';': case '{': case '}': - case '[': - if (!lex_tokench(lex, ch) || - !lex_endtoken(lex)) - { - return (lex->tok.ttype = TOKEN_FATAL); - } - if (!lex->flags.noops) - return (lex->tok.ttype = TOKEN_OPERATOR); case ']': case '#': -- 2.39.2