handle record access when checking for block string literals

This commit is contained in:
Joshua Warner 2025-01-11 10:50:33 -08:00
parent 6d2b635dbc
commit 875e355b68
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 72 additions and 1 deletions

View file

@ -0,0 +1,61 @@
@0-17 SpaceAfter(
Apply(
@1-15 ParensAround(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@1-13,
],
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: [
Body(
@1-2 Identifier {
ident: "e",
},
@3-13 RecordAccess(
PncApply(
@3-9 Str(
Block(
[],
),
),
[],
),
"d",
),
),
],
},
@14-15 SpaceBefore(
Var {
module_name: "",
ident: "e",
},
[
Newline,
],
),
),
),
[
@16-17 Var {
module_name: "",
ident: "m",
},
],
Space,
),
[
Newline,
],
)

View file

@ -529,6 +529,7 @@ mod test_snapshots {
pass/multiline_str_in_pat.expr,
pass/multiline_str_interpolation_records.expr,
pass/multiline_str_opt_field.expr,
pass/multiline_str_pnc_apply_in_assignment_newline.expr,
pass/multiline_string.expr,
pass/multiline_string_in_apply.expr,
pass/multiline_tuple_with_comments.expr,