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:
Karl Zylinski
2023-04-05 22:37:05 +02:00
parent eef44425c3
commit d7cc166eab

View File

@@ -163,8 +163,9 @@ get_token :: proc(t: ^Tokenizer) -> (token: Token, err: Error) {
skip_alphanum :: proc(t: ^Tokenizer) {
for t.offset < len(t.data) {
switch next_rune(t) {
switch t.r {
case 'A'..='Z', 'a'..='z', '0'..='9', '_':
next_rune(t)
continue
}