mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-04-10 12:09:17 +00:00
Better linecounting for pragmas; support for prgama file(filename)
This commit is contained in:
parent
d3861cea9f
commit
e66f2bcb33
1 changed files with 6 additions and 1 deletions
7
lexer.c
7
lexer.c
|
@ -405,16 +405,21 @@ static bool lex_try_pragma(lex_file *lex)
|
|||
if (!strcmp(param, "line")) {
|
||||
if (lex->push_line)
|
||||
lex->push_line--;
|
||||
--line;
|
||||
}
|
||||
else
|
||||
goto unroll;
|
||||
}
|
||||
else if (!strcmp(command, "file")) {
|
||||
lex->name = util_strdup(param);
|
||||
vec_push(lex_filenames, lex->name);
|
||||
}
|
||||
else
|
||||
goto unroll;
|
||||
|
||||
lex->line = line;
|
||||
while (ch != '\n')
|
||||
ch = lex_getch(lex);
|
||||
lex->line = line;
|
||||
return true;
|
||||
|
||||
unroll:
|
||||
|
|
Loading…
Reference in a new issue