mirror of
https://github.com/bearlanguageorg/bear.git
synced 2026-08-26 15:37:18 +00:00
More buildins and vscode exstention <CO-AUthored, ai>
This commit is contained in:
@@ -113,7 +113,7 @@ fn (mut v Vm) json_parse_object(mut p JsonParser) !i64 {
|
||||
p.skip_ws()
|
||||
if p.peek() == `}` {
|
||||
p.pos++
|
||||
v.structs << StructVal{ fields: fields }
|
||||
v.structs << StructVal{ fields: fields, by_name: v.index_fields(fields) }
|
||||
return v.mkstruct_handle(v.structs.len - 1)
|
||||
}
|
||||
for {
|
||||
@@ -152,7 +152,7 @@ fn (mut v Vm) json_parse_object(mut p JsonParser) !i64 {
|
||||
}
|
||||
return p.error('expected "," or "}" in object')
|
||||
}
|
||||
v.structs << StructVal{ fields: fields }
|
||||
v.structs << StructVal{ fields: fields, by_name: v.index_fields(fields) }
|
||||
return v.mkstruct_handle(v.structs.len - 1)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user