diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-08-03 00:02:05 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-08-15 10:06:21 +0900 |
| commit | 69b4a3142c39faa9f6e75a24a6293eb1a5030013 (patch) | |
| tree | 0bb16963da539e9ba980f32ad0e1f540cd3198ee | |
| parent | bb484d2310acf5c31792cfc16b887f4746a64816 (diff) | |
| download | ducc-69b4a3142c39faa9f6e75a24a6293eb1a5030013.tar.gz ducc-69b4a3142c39faa9f6e75a24a6293eb1a5030013.tar.zst ducc-69b4a3142c39faa9f6e75a24a6293eb1a5030013.zip | |
fix: fix wrong line number count
| -rw-r--r-- | preprocess.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/preprocess.c b/preprocess.c index 5374c53..0978dd3 100644 --- a/preprocess.c +++ b/preprocess.c @@ -327,6 +327,9 @@ void pp_tokenize_all(Preprocessor* pp) { pp->pos += 2; break; } + if (pp->src[pp->pos] == '\n') { + ++pp->line; + } ++pp->pos; } tok->kind = PpTokenKind_whitespace; |
