Fix a couple issues with multiline string literal formatting

This commit is contained in:
Joshua Warner 2025-01-11 21:56:13 -08:00
parent 316ec39af7
commit 962534e3d1
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 76 additions and 10 deletions

View file

@ -0,0 +1,10 @@
(
(
d
-(
"""
"""()?
)
)
)
Y

View file

@ -0,0 +1,61 @@
@0-17 SpaceAfter(
Apply(
@1-15 ParensAround(
ParensAround(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@2-3,
],
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(
@2-3 Var {
module_name: "",
ident: "d",
},
),
],
},
@4-14 SpaceBefore(
UnaryOp(
@5-13 TrySuffix(
PncApply(
@5-11 Str(
Block(
[],
),
),
[],
),
),
@4-5 Negate,
),
[
Newline,
],
),
),
),
),
[
@16-17 Tag(
"Y",
),
],
Space,
),
[
Newline,
],
)

View file

@ -403,6 +403,7 @@ mod test_snapshots {
pass/crazy_annotation_left.expr,
pass/crazy_annotation_left2.expr,
pass/crazy_implements_bangs.expr,
pass/crazy_parens_multiline_str_question_etc.expr,
pass/crazy_pat_ann.expr,
pass/curried_function_type.expr,
pass/dbg.expr,