mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Fix pipe closure after expr
This commit is contained in:
parent
d42af0b763
commit
300412a4da
5 changed files with 53 additions and 0 deletions
|
@ -4123,6 +4123,7 @@ where
|
||||||
"<=" => good!(OperatorOrDef::BinOp(BinOp::LessThanOrEq), 2),
|
"<=" => good!(OperatorOrDef::BinOp(BinOp::LessThanOrEq), 2),
|
||||||
"&&" => good!(OperatorOrDef::BinOp(BinOp::And), 2),
|
"&&" => good!(OperatorOrDef::BinOp(BinOp::And), 2),
|
||||||
"||" => good!(OperatorOrDef::BinOp(BinOp::Or), 2),
|
"||" => good!(OperatorOrDef::BinOp(BinOp::Or), 2),
|
||||||
|
"|" => Err((NoProgress, to_error("|", state.pos()))),
|
||||||
"//" => good!(OperatorOrDef::BinOp(BinOp::DoubleSlash), 2),
|
"//" => good!(OperatorOrDef::BinOp(BinOp::DoubleSlash), 2),
|
||||||
"->" => {
|
"->" => {
|
||||||
// makes no progress, so it does not interfere with `_ if isGood -> ...`
|
// makes no progress, so it does not interfere with `_ if isGood -> ...`
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
b
|
||||||
|
|e| s
|
|
@ -0,0 +1,47 @@
|
||||||
|
@0-7 SpaceAfter(
|
||||||
|
Defs(
|
||||||
|
Defs {
|
||||||
|
tags: [
|
||||||
|
EitherIndex(2147483648),
|
||||||
|
],
|
||||||
|
regions: [
|
||||||
|
@0-1,
|
||||||
|
],
|
||||||
|
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-1 Var {
|
||||||
|
module_name: "",
|
||||||
|
ident: "b",
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
@2-7 SpaceBefore(
|
||||||
|
Closure(
|
||||||
|
[
|
||||||
|
@3-4 Identifier {
|
||||||
|
ident: "e",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
@6-7 Var {
|
||||||
|
module_name: "",
|
||||||
|
ident: "s",
|
||||||
|
},
|
||||||
|
),
|
||||||
|
[
|
||||||
|
Newline,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
[
|
||||||
|
Newline,
|
||||||
|
],
|
||||||
|
)
|
|
@ -0,0 +1,2 @@
|
||||||
|
b
|
||||||
|
\e->s
|
|
@ -351,6 +351,7 @@ mod test_snapshots {
|
||||||
pass/arg_pattern_as.expr,
|
pass/arg_pattern_as.expr,
|
||||||
pass/as_in_func_type_args.expr,
|
pass/as_in_func_type_args.expr,
|
||||||
pass/assign_parens_item_newline_comment.expr,
|
pass/assign_parens_item_newline_comment.expr,
|
||||||
|
pass/backslash_closure_last_expr.expr,
|
||||||
pass/bang_newline_double_accessor.expr,
|
pass/bang_newline_double_accessor.expr,
|
||||||
pass/bangs_and_tuple_accessors.expr,
|
pass/bangs_and_tuple_accessors.expr,
|
||||||
pass/basic_apply.expr,
|
pass/basic_apply.expr,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue