Generalize RecordAccess special-cases to include TupleAccess

This commit is contained in:
Joshua Warner 2024-12-12 19:59:14 -08:00
parent d66f51db7b
commit 5a6e0f546b
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 68 additions and 2 deletions

View file

@ -0,0 +1,54 @@
@0-9 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(
"J",
),
),
],
},
@2-9 SpaceBefore(
UnaryOp(
@4-6 SpaceBefore(
TupleAccess(
TrySuffix {
target: Task,
expr: AccessorFunction(
TupleIndex(
"1",
),
),
},
"0",
),
[
Newline,
],
),
@2-3 Not,
),
[
Newline,
],
),
),
[
Newline,
],
)