]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Recognize a dot as operator when not in 'no-ops' mode in the lexer
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 12 Aug 2012 17:00:44 +0000 (19:00 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 12 Aug 2012 17:00:44 +0000 (19:00 +0200)
lexer.c

diff --git a/lexer.c b/lexer.c
index 2e6114e5493e1ce61876489a9444f5c493d5f8c5..29b3018916b4f93f3f74b5235b7cf108beb05695 100644 (file)
--- 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))
            {