Resolve TODO around handling non-plain strings

This commit is contained in:
Joshua Warner 2025-01-11 19:49:47 -08:00
parent e0ef01fa82
commit 61bc0b3464
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
7 changed files with 168 additions and 28 deletions

View file

@ -0,0 +1,2 @@
import "\\" as m
e

View file

@ -0,0 +1,55 @@
@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: [
IngestedFileImport(
IngestedFileImport {
before_path: [],
path: @6-10 Line(
[
EscapedChar(
Backslash,
),
],
),
name: KeywordItem {
keyword: Spaces {
before: [],
item: ImportAsKeyword,
after: [],
},
item: @13-14 "m",
},
annotation: None,
},
),
],
},
@15-16 SpaceBefore(
Var {
module_name: "",
ident: "e",
},
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -0,0 +1,2 @@
import"\\"as m
e

View file

@ -473,6 +473,7 @@ mod test_snapshots {
pass/implements_not_keyword.expr,
pass/implements_record_destructure.expr,
pass/import.moduledefs,
pass/import_backslash_as_m.expr,
pass/import_from_package.moduledefs,
pass/import_in_closure_with_curlies_after.expr,
pass/import_with_alias.moduledefs,