mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Don't turn pnc apply dbg into DbgStmt
This commit is contained in:
parent
6d324590da
commit
6d2b635dbc
7 changed files with 103 additions and 82 deletions
|
@ -1,22 +1,46 @@
|
|||
@0-8 SpaceAfter(
|
||||
DbgStmt {
|
||||
first: @4-7 BinOps(
|
||||
[
|
||||
(
|
||||
@4-5 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
@5-6 Slash,
|
||||
@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: [
|
||||
Stmt(
|
||||
@0-8 PncApply(
|
||||
@0-3 Dbg,
|
||||
[
|
||||
@4-7 BinOps(
|
||||
[
|
||||
(
|
||||
@4-5 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
@5-6 Slash,
|
||||
),
|
||||
],
|
||||
@6-7 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
@6-7 Var {
|
||||
module_name: "",
|
||||
ident: "a",
|
||||
},
|
||||
),
|
||||
extra_args: [],
|
||||
continuation: @9-10 SpaceBefore(
|
||||
},
|
||||
@9-10 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "d",
|
||||
|
@ -25,8 +49,7 @@
|
|||
Newline,
|
||||
],
|
||||
),
|
||||
pnc_style: true,
|
||||
},
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
dbg(
|
||||
5, #
|
||||
)
|
||||
e
|
|
@ -0,0 +1,53 @@
|
|||
@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: [
|
||||
Stmt(
|
||||
@0-10 ParensAround(
|
||||
PncApply(
|
||||
@1-4 Dbg,
|
||||
[
|
||||
@5-6 SpaceAfter(
|
||||
Num(
|
||||
"5",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@11-12 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "e",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
(dbg(5#
|
||||
))
|
||||
e
|
|
@ -642,6 +642,7 @@ mod test_snapshots {
|
|||
pass/plus_when.expr,
|
||||
pass/pnc_apply_comment_after_newline.expr,
|
||||
pass/pnc_apply_neg_pattern.expr,
|
||||
pass/pnc_dbg_parens_comment.expr,
|
||||
pass/pnc_parens_apply_etc.expr,
|
||||
pass/pos_inf_float.expr,
|
||||
pass/positive_float.expr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue