]> 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 bfa7443f3eb09fa13e1b104e33f67562a84f7b88..0fa25f79b309a43eb3c6e62396a3cddf69d7f967 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -523,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))
            {
@@ -623,7 +624,10 @@ int lex_do(lex_file *lex)
                } else if (!strcmp(v, "for")  ||
                         !strcmp(v, "while")  ||
                         !strcmp(v, "do")     ||
+                        !strcmp(v, "if")     ||
+                        !strcmp(v, "else")   ||
                         !strcmp(v, "var")    ||
+                        !strcmp(v, "local")  ||
                         !strcmp(v, "return") ||
                         !strcmp(v, "const"))
                        lex->tok->ttype = TOKEN_KEYWORD;