mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
Fix for skip_alphanum in JSON tokenizer not checking if first character is non-alphanum. This broke any single-character key when using SJSON specification in combination with not using quoted strings.
This commit is contained in:
@@ -163,8 +163,9 @@ get_token :: proc(t: ^Tokenizer) -> (token: Token, err: Error) {
|
|||||||
|
|
||||||
skip_alphanum :: proc(t: ^Tokenizer) {
|
skip_alphanum :: proc(t: ^Tokenizer) {
|
||||||
for t.offset < len(t.data) {
|
for t.offset < len(t.data) {
|
||||||
switch next_rune(t) {
|
switch t.r {
|
||||||
case 'A'..='Z', 'a'..='z', '0'..='9', '_':
|
case 'A'..='Z', 'a'..='z', '0'..='9', '_':
|
||||||
|
next_rune(t)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user