X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=lexer.c;h=0fa25f79b309a43eb3c6e62396a3cddf69d7f967;hb=5064554b76d68f51870118c4582c72b9e2aeef83;hp=2e6114e5493e1ce61876489a9444f5c493d5f8c5;hpb=067294a470beb5479c97a3ac9e5147691e6013a8;p=xonotic%2Fgmqcc.git diff --git a/lexer.c b/lexer.c index 2e6114e..0fa25f7 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)) { @@ -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;