]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - lexer.c
flags and warnings not printed anymore without -dump
[xonotic/gmqcc.git] / lexer.c
diff --git a/lexer.c b/lexer.c
index 2e6114e5493e1ce61876489a9444f5c493d5f8c5..0fa25f79b309a43eb3c6e62396a3cddf69d7f967 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))
            {
@@ -628,6 +627,7 @@ int lex_do(lex_file *lex)
                         !strcmp(v, "if")     ||
                         !strcmp(v, "else")   ||
                         !strcmp(v, "var")    ||
+                        !strcmp(v, "local")  ||
                         !strcmp(v, "return") ||
                         !strcmp(v, "const"))
                        lex->tok->ttype = TOKEN_KEYWORD;