aboutsummaryrefslogtreecommitdiff
path: root/src/preprocess.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/preprocess.c')
-rw-r--r--src/preprocess.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/preprocess.c b/src/preprocess.c
index 3a0c0bc..f4f67f7 100644
--- a/src/preprocess.c
+++ b/src/preprocess.c
@@ -13,10 +13,15 @@ static void preprocess_erase(struct ctx *ctx, size_t start)
for (size_t i = start; i < ctx->size; i++) {
char cur = ctx->data[i];
- if (cur == '\n' || cur == '\0')
+ if (cur == '\0')
break;
- ctx->data[i] = ' '; // Spaces get skipped by tokenizer anyways
+ if (cur == '\n') {
+ ctx->data[i] = MACRO_NEWLINE;
+ break;
+ } else {
+ ctx->data[i] = MACRO_SKIP;
+ }
}
}