Skip to content

Commit

Permalink
Add condinional check to expectNl
Browse files Browse the repository at this point in the history
  • Loading branch information
wrongnull committed Jan 6, 2024
1 parent 86cc098 commit 5f36ffa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/aro/Preprocessor.zig
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ fn expectNl(pp: *Preprocessor, tokenizer: *Tokenizer) Error!void {
const tok = tokenizer.next();
if (tok.id == .nl or tok.id == .eof) return;
if (tok.id == .whitespace) continue;
if (tok.id == .comment and pp.comp.langopts.preserve_comments) continue;
if (!sent_err) {
sent_err = true;
try pp.err(tok, .extra_tokens_directive_end);
Expand Down

0 comments on commit 5f36ffa

Please sign in to comment.