Skip to content

Reject unterminated block comments - #799

Merged
ydah merged 1 commit into
masterfrom
fix/unterminated-block-comment
Sep 4, 2026
Merged

ydah merged 1 commit into
masterfrom
fix/unterminated-block-comment

Conversation

@ydah

@ydah ydah commented Sep 4, 2026

Copy link
Copy Markdown
Member

Lexer#lex_comment could loop indefinitely when a block comment reached EOF without a closing */ or trailing newline. With a trailing newline, the same invalid comment was silently accepted as EOF.

Replace the retry loop with a single terminator scan and raise an Unterminated comment parse error when it fails.

@ydah
ydah merged commit dd0e363 into master Sep 4, 2026
45 checks passed
@ydah
ydah deleted the fix/unterminated-block-comment branch September 4, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant