Fix several fmt+parse bugs found by fuzzing

This commit is contained in:
Joshua Warner 2023-02-18 14:32:51 -08:00
parent f0a74636a0
commit b5f284cd78
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
14 changed files with 297 additions and 151 deletions

View file

@ -0,0 +1,7 @@
RecordUpdate {
update: @1-2 Var {
module_name: "",
ident: "e",
},
fields: [],
}

View file

@ -0,0 +1,23 @@
BinOps(
[
(
@0-5 List(
Collection {
items: [
@1-2 Tag(
"K",
),
],
final_comments: [
Newline,
],
},
),
@5-6 Minus,
),
],
@6-7 Var {
module_name: "",
ident: "i",
},
)

View file

@ -0,0 +1,54 @@
Defs(
Defs {
tags: [
Index(2147483648),
Index(0),
],
regions: [
@0-3,
@4-11,
],
space_before: [
Slice(start = 0, length = 0),
Slice(start = 0, length = 1),
],
space_after: [
Slice(start = 0, length = 0),
Slice(start = 1, length = 0),
],
spaces: [
Newline,
],
type_defs: [
Opaque {
header: TypeHeader {
name: @4-6 "Na",
vars: [],
},
typ: @10-11 SpaceBefore(
BoundVariable(
"e",
),
[
Newline,
],
),
derived: None,
},
],
value_defs: [
Annotation(
@0-1 Identifier(
"a",
),
@2-3 BoundVariable(
"e",
),
),
],
},
@12-14 Var {
module_name: "",
ident: "e0",
},
)