commit 9a98bdaa05d850fba8c993a623a85099e6bad771
parent e6fc1320c98f84ce121f25ac8e40ec46ffa76ee4
Author: citbl <citbl@citbl.org>
Date: Sun, 10 May 2026 18:29:38 +1000
minor
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.clang-format b/.clang-format
@@ -12,4 +12,5 @@ AllowShortFunctionsOnASingleLine: false
SortIncludes: false
BreakBeforeBraces: Stroustrup
PenaltyBreakBeforeFirstCallParameter: 1
+InsertNewlineAtEOF: true
#AlignConsecutiveAssignments: Consecutive
diff --git a/src/lexer.c b/src/lexer.c
@@ -69,6 +69,7 @@ static void run_until_char(Lexer *l, char c)
// printf("%zu", l->state.pos);
l->state.pos++;
} while (peek(l) != c);
+ l->state.pos++;
}
Lexer *lexer_lex(Lexer *l)
@@ -87,9 +88,7 @@ Lexer *lexer_lex(Lexer *l)
c = l->code[l->state.pos];
if (c == '/' && peek(l) == '/') {
- // continue until the end of the line
run_until_char(l, '\n');
- l->state.pos++;
continue;
}