mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 18:08:55 +03:00
parent
545e6bc989
commit
3b51d7cd13
@ -924,7 +924,7 @@ macro_rules! join_alias_to_body {
|
||||
}
|
||||
|
||||
fn parse_defs_end<'a>(
|
||||
_options: ExprParseOptions,
|
||||
options: ExprParseOptions,
|
||||
min_indent: u32,
|
||||
mut defs: Defs<'a>,
|
||||
arena: &'a Bump,
|
||||
@ -935,7 +935,7 @@ fn parse_defs_end<'a>(
|
||||
loop {
|
||||
let state = global_state;
|
||||
|
||||
global_state = match parse_single_def(_options, min_indent, arena, state) {
|
||||
global_state = match parse_single_def(options, min_indent, arena, state) {
|
||||
Ok((_, Some(single_def), next_state)) => {
|
||||
let region = single_def.region;
|
||||
let spaces_before_current = single_def.spaces_before;
|
||||
@ -1953,7 +1953,7 @@ pub fn toplevel_defs<'a>() -> impl Parser<'a, Defs<'a>, EExpr<'a>> {
|
||||
let start_column = state.column();
|
||||
|
||||
let options = ExprParseOptions {
|
||||
accept_multi_backpassing: false,
|
||||
accept_multi_backpassing: true,
|
||||
check_for_arrow: true,
|
||||
};
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
main =
|
||||
arg1, arg2 <- f {}
|
||||
"Roc <3 Zig!\n"
|
@ -0,0 +1,67 @@
|
||||
Defs {
|
||||
tags: [
|
||||
Index(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-50,
|
||||
],
|
||||
space_before: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
space_after: [
|
||||
Slice(start = 0, length = 0),
|
||||
],
|
||||
spaces: [],
|
||||
type_defs: [],
|
||||
value_defs: [
|
||||
Body(
|
||||
@0-4 Identifier(
|
||||
"main",
|
||||
),
|
||||
@12-50 SpaceBefore(
|
||||
Backpassing(
|
||||
[
|
||||
@12-16 Identifier(
|
||||
"arg1",
|
||||
),
|
||||
@18-22 Identifier(
|
||||
"arg2",
|
||||
),
|
||||
],
|
||||
@26-30 Apply(
|
||||
@26-27 Var {
|
||||
module_name: "",
|
||||
ident: "f",
|
||||
},
|
||||
[
|
||||
@28-30 Record(
|
||||
[],
|
||||
),
|
||||
],
|
||||
Space,
|
||||
),
|
||||
@35-50 SpaceBefore(
|
||||
Str(
|
||||
Line(
|
||||
[
|
||||
Plaintext(
|
||||
"Roc <3 Zig!",
|
||||
),
|
||||
EscapedChar(
|
||||
Newline,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
main =
|
||||
arg1, arg2 <- f {}
|
||||
"Roc <3 Zig!\n"
|
@ -309,6 +309,7 @@ mod test_snapshots {
|
||||
pass/mixed_docs.expr,
|
||||
pass/module_def_newline.moduledefs,
|
||||
pass/multi_backpassing.expr,
|
||||
pass/multi_backpassing_in_def.moduledefs,
|
||||
pass/multi_backpassing_with_apply.expr,
|
||||
pass/multi_char_string.expr,
|
||||
pass/multiline_string.expr,
|
||||
|
Loading…
Reference in New Issue
Block a user