roc/crates/compiler/test_syntax/tests/snapshots/pass/multiline_string.expr.result-ast
Joshua Warner b4fa7294c7
Extend test_syntax to check that canonicalization doesn't panic on the input
Importantly, this would have caught the issue discovered in #7279, prior to that landing on main.
2024-12-06 17:13:10 -08:00

119 lines
3.9 KiB
Text

@0-95 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
EitherIndex(2147483649),
EitherIndex(2147483650),
],
regions: [
@0-22,
@23-49,
@50-92,
],
space_before: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 1 },
Slice<roc_parse::ast::CommentOrNewline> { start: 1, length: 1 },
],
space_after: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
Slice<roc_parse::ast::CommentOrNewline> { start: 1, length: 0 },
Slice<roc_parse::ast::CommentOrNewline> { start: 2, length: 0 },
],
spaces: [
Newline,
Newline,
],
type_defs: [],
value_defs: [
Body(
@0-1 Identifier {
ident: "a",
},
@4-22 Str(
Line(
[
Plaintext(
"Hello,",
),
EscapedChar(
Newline,
),
EscapedChar(
Newline,
),
Plaintext(
"World!",
),
],
),
),
),
Body(
@23-24 Identifier {
ident: "b",
},
@27-49 Str(
Block(
[
[
Plaintext(
"Hello,",
),
EscapedChar(
Newline,
),
EscapedChar(
Newline,
),
Plaintext(
"World!",
),
],
],
),
),
),
Body(
@50-51 Identifier {
ident: "c",
},
@58-92 SpaceBefore(
Str(
Block(
[
[
Plaintext(
"Hello,\n",
),
Plaintext(
"\n",
),
Plaintext(
"World!",
),
],
],
),
),
[
Newline,
],
),
),
],
},
@93-95 SpaceBefore(
Num(
"42",
),
[
Newline,
],
),
),
[
Newline,
],
)