mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-31 17:17:26 +00:00
Canonicalize the pattern in annotations
This commit is contained in:
parent
2331aa1d77
commit
408379f8d3
8 changed files with 86 additions and 3 deletions
|
@ -0,0 +1,2 @@
|
|||
{ p ?? m } : J
|
||||
O
|
|
@ -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,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
{p?
|
||||
m}:J
|
||||
O
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue