mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-24 04:41:25 +00:00
Changed the preprocess test to reproduce the input file
This commit is contained in:
parent
a3791b3f51
commit
caf4771ba1
1 changed files with 8 additions and 0 deletions
|
@ -9,6 +9,7 @@ bool preprocess(const char *filename)
|
|||
|
||||
do {
|
||||
tok = lex_do(lex);
|
||||
/*
|
||||
if (tok == TOKEN_EOL)
|
||||
printf("EOL");
|
||||
else if (tok >= TOKEN_START && tok <= TOKEN_FATAL)
|
||||
|
@ -19,6 +20,13 @@ bool preprocess(const char *filename)
|
|||
printf(">>%s<<\n", lex->tok.value);
|
||||
else
|
||||
printf("\n");
|
||||
*/
|
||||
if (tok == TOKEN_EOL)
|
||||
printf("\n");
|
||||
else if (tok >= TOKEN_START && tok < TOKEN_EOF)
|
||||
printf("%s", lex->tok.value);
|
||||
else
|
||||
printf("%c", tok);
|
||||
} while (tok < TOKEN_EOF);
|
||||
|
||||
lex_close(lex);
|
||||
|
|
Loading…
Reference in a new issue