Merge pull request #5599 from BradLewis/fix/file-tag-eof

Check for EOF when scanning file tags
This commit is contained in:
gingerBill
2025-08-19 12:58:29 +01:00
committed by GitHub

View File

@@ -209,14 +209,14 @@ scan_comment :: proc(t: ^Tokenizer) -> string {
scan_file_tag :: proc(t: ^Tokenizer) -> string {
offset := t.offset - 1
for t.ch != '\n' {
for t.ch != '\n' && t.ch != utf8.RUNE_EOF {
if t.ch == '/' {
next := peek_byte(t, 0)
if next == '/' || next == '*' {
break
}
}
}
advance_rune(t)
}