Give error if raw literal hits EOF, and stop removing .Using if it exists in flags and allowed_flags.
This commit is contained in:
1 parent
439e2c9242
commit
b8658547e0
2 files changed
+2
-6
No files matched your search
@@ -1564,10 +1564,6 @@ check_field_flag_prefixes :: proc(p: ^Parser, name_count: int, allowed_flags, se
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if .Using in allowed_flags && .Using in flags {
|
|
||||||
flags &~= {.Using};
|
|
||||||
}
|
|
||||||
|
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -235,8 +235,8 @@ scan_raw_string :: proc(t: ^Tokenizer) -> string {
|
|||||||
|
|
||||||
for {
|
for {
|
||||||
ch := t.ch;
|
ch := t.ch;
|
||||||
if ch == '\n' || ch < 0 {
|
if ch == utf8.RUNE_EOF {
|
||||||
error(t, offset, "raw string literal was not terminated");
|
error(t, offset, "string literal was not terminated");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
advance_rune(t);
|
advance_rune(t);
|
||||||
|
|||||||
Reference in new issue
Block a user