Canonicalize the pattern in annotations

This commit is contained in:
Joshua Warner 2025-01-09 21:57:36 -08:00
parent 2331aa1d77
commit 408379f8d3
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
8 changed files with 86 additions and 3 deletions

View file

@ -0,0 +1,56 @@
@0-10 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-8,
],
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: [
Annotation(
@0-6 RecordDestructure(
[
@1-5 OptionalField(
"p",
@4-5 SpaceBefore(
Var {
module_name: "",
ident: "m",
},
[
Newline,
],
),
),
],
),
@7-8 Apply(
"",
"J",
[],
),
),
],
},
@9-10 SpaceBefore(
Tag(
"O",
),
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -690,6 +690,7 @@ mod test_snapshots {
pass/single_arg_with_underscore_closure.expr,
pass/single_underscore_closure.expr,
pass/sneaky_implements_in_opaque_fn_type.expr,
pass/space_after_opt_field_pat.expr,
pass/space_before_colon.full,
pass/space_before_parens_space_after.expr,
pass/space_only_after_minus.expr,