mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-25 21:37:48 +00:00
Fix empty SpaceBefore instance
This commit is contained in:
parent
f1d9667ea0
commit
d3426ebce1
7 changed files with 92 additions and 93 deletions
|
|
@ -0,0 +1 @@
|
|||
Expr(BadOperator("=", @13), @0)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(
|
||||
return e
|
||||
t)=t
|
||||
|
|
@ -1,22 +1,19 @@
|
|||
@0-10 SpaceBefore(
|
||||
Return(
|
||||
@0-8 UnaryOp(
|
||||
@7-8 Var {
|
||||
module_name: "",
|
||||
ident: "r",
|
||||
},
|
||||
@6-7 Negate,
|
||||
),
|
||||
Some(
|
||||
@9-10 SpaceBefore(
|
||||
Num(
|
||||
"1",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
@0-10 Return(
|
||||
@0-8 UnaryOp(
|
||||
@7-8 Var {
|
||||
module_name: "",
|
||||
ident: "r",
|
||||
},
|
||||
@6-7 Negate,
|
||||
),
|
||||
Some(
|
||||
@9-10 SpaceBefore(
|
||||
Num(
|
||||
"1",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,38 +1,35 @@
|
|||
@0-17 SpaceAfter(
|
||||
SpaceBefore(
|
||||
Return(
|
||||
@0-8 Var {
|
||||
module_name: "",
|
||||
ident: "n",
|
||||
},
|
||||
Some(
|
||||
@9-17 SpaceBefore(
|
||||
ParensAround(
|
||||
SpaceAfter(
|
||||
ParensAround(
|
||||
SpaceAfter(
|
||||
Num(
|
||||
"0",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
Return(
|
||||
@0-8 Var {
|
||||
module_name: "",
|
||||
ident: "n",
|
||||
},
|
||||
Some(
|
||||
@9-17 SpaceBefore(
|
||||
ParensAround(
|
||||
SpaceAfter(
|
||||
ParensAround(
|
||||
SpaceAfter(
|
||||
Num(
|
||||
"0",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
|
|
|
|||
|
|
@ -1,48 +1,45 @@
|
|||
@0-13 SpaceBefore(
|
||||
Return(
|
||||
@0-8 Num(
|
||||
"-1",
|
||||
),
|
||||
Some(
|
||||
@10-13 Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@10-11,
|
||||
],
|
||||
space_before: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 1 },
|
||||
],
|
||||
space_after: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 1, length: 0 },
|
||||
],
|
||||
spaces: [
|
||||
LineComment(
|
||||
"",
|
||||
@0-13 Return(
|
||||
@0-8 Num(
|
||||
"-1",
|
||||
),
|
||||
Some(
|
||||
@10-13 Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@10-11,
|
||||
],
|
||||
space_before: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 1 },
|
||||
],
|
||||
space_after: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 1, length: 0 },
|
||||
],
|
||||
spaces: [
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Stmt(
|
||||
@10-11 Tag(
|
||||
"X",
|
||||
),
|
||||
],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Stmt(
|
||||
@10-11 Tag(
|
||||
"X",
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
},
|
||||
@12-13 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "s",
|
||||
},
|
||||
@12-13 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "s",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
[],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ mod test_snapshots {
|
|||
fail/record_type_open_indent.expr,
|
||||
fail/record_type_tab.expr,
|
||||
fail/return_as_single_line_expr.expr,
|
||||
fail/return_in_pat.expr,
|
||||
fail/single_no_end.expr,
|
||||
fail/tab_crash.header,
|
||||
fail/tag_union_end.expr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue