char *pragma = NULL;
char *command = NULL;
char *param = NULL;
+ size_t line;
if (lex->flags.preprocessing)
return false;
+ line = lex->line;
+
ch = lex_getch(lex);
if (ch != '#') {
lex_ungetch(lex, ch);
if (!strcmp(command, "push")) {
if (!strcmp(param, "line")) {
lex->push_line++;
- lex->line--;
+ --line;
}
else
goto unroll;
if (!strcmp(param, "line")) {
if (lex->push_line)
lex->push_line--;
- lex->line--;
}
else
goto unroll;
while (ch != '\n')
ch = lex_getch(lex);
+ lex->line = line;
return true;
unroll:
vec_free(pragma);
}
lex_ungetch(lex, '#');
+
+ lex->line = line;
return false;
}