roc/crates/compiler/test_syntax/tests/snapshots/pass/plus_when.expr.result-ast
Joshua Warner b4fa7294c7
Extend test_syntax to check that canonicalization doesn't panic on the input
Importantly, this would have caught the issue discovered in #7279, prior to that landing on main.
2024-12-06 17:13:10 -08:00

59 lines
1.5 KiB
Text

@0-53 SpaceAfter(
BinOps(
[
(
@0-1 Num(
"1",
),
@2-3 Plus,
),
],
@8-53 SpaceBefore(
When(
@13-16 Tag(
"Foo",
),
[
WhenBranch {
patterns: [
@28-31 SpaceBefore(
Tag(
"Foo",
),
[
Newline,
],
),
],
value: @35-36 Num(
"2",
),
guard: None,
},
WhenBranch {
patterns: [
@45-48 SpaceBefore(
Tag(
"Bar",
),
[
Newline,
],
),
],
value: @52-53 Num(
"3",
),
guard: None,
},
],
),
[
Newline,
],
),
),
[
Newline,
],
)