Better linecounting for pragmas; support for prgama file(filename)

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-18 15:30:40 +01:00
parent d3861cea9f
commit e66f2bcb33

View file

@ -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: