Fix a couple minor parsing bugs

This commit is contained in:
Joshua Warner 2024-12-01 12:22:51 -08:00
parent d4301e86a3
commit 5cd38c969f
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
12 changed files with 90 additions and 1 deletions

View file

@ -0,0 +1,38 @@
SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-1,
],
space_before: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
space_after: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
spaces: [],
type_defs: [],
value_defs: [
Stmt(
@0-1 Tag(
"T",
),
),
],
},
@2-4 SpaceBefore(
RecordUpdater(
"n",
),
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -0,0 +1,22 @@
Apply(
@2-11 ParensAround(
SpaceBefore(
Return(
@2-11 Num(
"-3e",
),
None,
),
[
Newline,
],
),
),
[
@12-13 Var {
module_name: "",
ident: "g",
},
],
Space,
)

View file

@ -0,0 +1,2 @@
(
return-3e)g

View file

@ -0,0 +1,12 @@
BinOps(
[
(
@0-3 Try,
@3-4 Minus,
),
],
@4-5 Var {
module_name: "",
ident: "w",
},
)