mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-16 08:04:07 +00:00
Merge pull request #5599 from BradLewis/fix/file-tag-eof
Check for EOF when scanning file tags
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user