mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Fix newlines after multiline apply func pattern (#7342)
This commit is contained in:
parent
8701b922b4
commit
f5cd0568dd
16 changed files with 143 additions and 24 deletions
|
@ -1,4 +1,5 @@
|
|||
1 (0 #
|
||||
1
|
||||
(0 #
|
||||
0)
|
||||
f : f
|
||||
t
|
|
@ -1,4 +1,5 @@
|
|||
1 (ts 0)
|
||||
1
|
||||
(ts 0)
|
||||
|
||||
#
|
||||
|
||||
|
|
|
@ -2,5 +2,4 @@
|
|||
dbg
|
||||
D
|
||||
q
|
||||
h
|
||||
)
|
||||
h)
|
|
@ -1,4 +1,5 @@
|
|||
1 (0 #
|
||||
1
|
||||
(0 #
|
||||
f)
|
||||
(0 #
|
||||
f) : f
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
\I [[
|
||||
\I
|
||||
[[
|
||||
O #
|
||||
,
|
||||
i]]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
1 (i, p #
|
||||
1
|
||||
(i, p #
|
||||
) : f
|
||||
n
|
|
@ -1,3 +1,4 @@
|
|||
s { t #
|
||||
s
|
||||
{ t #
|
||||
} : s
|
||||
p #
|
|
@ -0,0 +1,6 @@
|
|||
(
|
||||
1 #
|
||||
Q
|
||||
a : t
|
||||
n
|
||||
)
|
|
@ -0,0 +1,61 @@
|
|||
@0-14 SpaceAfter(
|
||||
ParensAround(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@1-11,
|
||||
],
|
||||
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(
|
||||
@2-3 Apply(
|
||||
@2-3 SpaceAfter(
|
||||
NumLiteral(
|
||||
"1",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
@6-7 Tag(
|
||||
"Q",
|
||||
),
|
||||
@8-9 Identifier {
|
||||
ident: "a",
|
||||
},
|
||||
],
|
||||
),
|
||||
@10-11 BoundVariable(
|
||||
"t",
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@12-13 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "n",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
((1#
|
||||
)Q a:t
|
||||
n)
|
|
@ -0,0 +1,6 @@
|
|||
(
|
||||
i <- (
|
||||
dbg 0
|
||||
_)
|
||||
9
|
||||
)
|
|
@ -0,0 +1,40 @@
|
|||
@0-18 SpaceAfter(
|
||||
ParensAround(
|
||||
ParensAround(
|
||||
Backpassing(
|
||||
[
|
||||
@2-3 Identifier {
|
||||
ident: "i",
|
||||
},
|
||||
],
|
||||
@5-14 ParensAround(
|
||||
DbgStmt {
|
||||
first: @10-11 Num(
|
||||
"0",
|
||||
),
|
||||
extra_args: [],
|
||||
continuation: @12-13 SpaceBefore(
|
||||
Underscore(
|
||||
"",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
},
|
||||
),
|
||||
@15-16 SpaceBefore(
|
||||
Num(
|
||||
"9",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
((i<-(dbg 0
|
||||
_)
|
||||
9))
|
|
@ -596,6 +596,8 @@ mod test_snapshots {
|
|||
pass/record_updater_var_apply.expr,
|
||||
pass/record_with_if.expr,
|
||||
pass/record_with_lots_of_newlines.expr,
|
||||
pass/repr_7342.expr,
|
||||
pass/repr_7343.expr,
|
||||
pass/repr_7346.expr,
|
||||
pass/requires_type.header,
|
||||
pass/return_apply_newline.expr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue