mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 05:24:15 +00:00
Fix parenthesized spaces in tag unions
This commit is contained in:
parent
02e07f95e7
commit
3acc6940b4
5 changed files with 209 additions and 30 deletions
|
|
@ -0,0 +1,4 @@
|
|||
g : [
|
||||
T T, #
|
||||
]
|
||||
D
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
@0-12 SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-10,
|
||||
],
|
||||
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-1 Identifier {
|
||||
ident: "g",
|
||||
},
|
||||
@2-10 TagUnion {
|
||||
ext: None,
|
||||
tags: [
|
||||
@3-9 Apply {
|
||||
name: @3-4 "T",
|
||||
args: [
|
||||
@5-6 SpaceAfter(
|
||||
Apply(
|
||||
"",
|
||||
"T",
|
||||
[],
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
@11-12 SpaceBefore(
|
||||
Tag(
|
||||
"D",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
g:[T(T#
|
||||
)]
|
||||
D
|
||||
|
|
@ -298,6 +298,7 @@ mod test_snapshots {
|
|||
pass/annotated_tuple_destructure.expr,
|
||||
pass/annotation_apply_newlines.expr,
|
||||
pass/annotation_comment_before_colon.expr,
|
||||
pass/annotation_tag_parens_comment.expr,
|
||||
pass/annotation_tuple_comment.expr,
|
||||
pass/annotation_tuple_newline.expr,
|
||||
pass/annotation_tuple_parens_newlines.expr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue