From: Wolfgang (Blub) Bumiller Date: Sun, 12 Aug 2012 17:00:44 +0000 (+0200) Subject: Recognize a dot as operator when not in 'no-ops' mode in the lexer X-Git-Tag: 0.1-rc1~342 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=fd1a85062909001f89cc04c1aba364c7f0986c76;p=xonotic%2Fgmqcc.git Recognize a dot as operator when not in 'no-ops' mode in the lexer --- diff --git a/lexer.c b/lexer.c index 2e6114e..29b3018 100644 --- a/lexer.c +++ b/lexer.c @@ -497,8 +497,6 @@ int lex_do(lex_file *lex) case '[': case ']': - case '.': - case '#': return (lex->tok->ttype = ch); @@ -525,13 +523,14 @@ int lex_do(lex_file *lex) case '^': case '~': case ',': - return ch; + case '.': + return (lex->tok->ttype = ch); default: break; } } - if (ch == ',') { + if (ch == ',' || ch == '.') { if (!lex_tokench(lex, ch) || !lex_endtoken(lex)) {