Fix placement of comma after implements in pnc apply patterns

This commit is contained in:
Joshua Warner 2025-01-10 21:52:56 -08:00
parent 2bbcbbd5c1
commit 2e4e4bb957
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 61 additions and 3 deletions

View file

@ -0,0 +1,2 @@
g((implements), x) = c
c

View file

@ -0,0 +1,53 @@
@0-19 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-17,
],
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: [
Body(
@0-15 PncApply(
@0-1 Identifier {
ident: "g",
},
[
@2-12 Identifier {
ident: "implements",
},
@13-14 Identifier {
ident: "x",
},
],
),
@16-17 Var {
module_name: "",
ident: "c",
},
),
],
},
@18-19 SpaceBefore(
Var {
module_name: "",
ident: "c",
},
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -0,0 +1,2 @@
g(implements,x)=c
c

View file

@ -465,6 +465,7 @@ mod test_snapshots {
pass/implements_after_comment_with_newline.expr,
pass/implements_annotation_comment.expr,
pass/implements_in_pat_after_comment.expr,
pass/implements_in_pnc_pattern.expr,
pass/implements_newline_in_fn_ty.expr,
pass/implements_newlines_comments.expr,
pass/implements_not_keyword.expr,