Fix multiline str pattern newline multiplication

This commit is contained in:
Joshua Warner 2024-12-12 21:30:42 -08:00
parent e9a8588c3e
commit f1d9667ea0
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 92 additions and 0 deletions

View file

@ -0,0 +1,58 @@
@0-16 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-14,
],
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(
@0-1 Apply(
@0-1 Identifier {
ident: "u",
},
[
@2-11 Apply(
@2-8 StrLiteral(
Block(
[],
),
),
[
@9-10 NumLiteral(
"0",
),
],
),
],
),
@13-14 BoundVariable(
"f",
),
),
],
},
@15-16 SpaceBefore(
Var {
module_name: "",
ident: "s",
},
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -471,6 +471,7 @@ mod test_snapshots {
pass/multiline_apply_equals_multiline_apply.expr,
pass/multiline_backpassing.expr,
pass/multiline_binop_when_with_comments.expr,
pass/multiline_str_apply_in_parens_pat.expr,
pass/multiline_str_crazyness.expr,
pass/multiline_str_in_pat.expr,
pass/multiline_str_opt_field.expr,