Check for EOF when scanning file tags

This commit is contained in:
Brad Lewis
2025-08-19 07:20:31 -04:00
parent 409e397566
commit 8bab146b2d
+2 -2
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)
}