mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix odin/parser issues
This commit is contained in:
@@ -150,13 +150,21 @@ scan_comment :: proc(t: ^Tokenizer) -> string {
|
||||
|
||||
/* style comment */
|
||||
advance_rune(t);
|
||||
for t.ch >= 0 {
|
||||
nest := 1;
|
||||
for t.ch >= 0 && nest > 0 {
|
||||
ch := t.ch;
|
||||
advance_rune(t);
|
||||
if ch == '/' && t.ch == '*' {
|
||||
nest += 1;
|
||||
}
|
||||
|
||||
if ch == '*' && t.ch == '/' {
|
||||
nest -= 1;
|
||||
advance_rune(t);
|
||||
next = t.offset;
|
||||
break general;
|
||||
if nest == 0 {
|
||||
break general;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user