From caf4771ba16b6ad6d4d99fb34712a1b3f86266e8 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Fri, 2 Nov 2012 18:37:58 +0100 Subject: [PATCH] Changed the preprocess test to reproduce the input file --- preprocess.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/preprocess.c b/preprocess.c index adf5e5e..32f9c28 100644 --- a/preprocess.c +++ b/preprocess.c @@ -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); -- 2.39.2