Fix block comment at EOF without trailing newline (#1828)

This commit is contained in:
Sergio Salvi
2026-08-21 15:46:37 -07:00
committed by GitHub
parent 6551a59f9e
commit 7404f7d160
2 changed files with 48 additions and 2 deletions
@@ -625,11 +625,11 @@ public final class Lexer {
while (lookahead != EOF) {
if (prev == '*' && lookahead == '/') {
nextChar();
break;
return;
}
prev = nextChar();
}
if (lookahead == EOF) throw unexpectedEndOfFile();
throw unexpectedEndOfFile();
}
private void lexHexNumber() {