Parse and format top-level import defs with no alias or exposed members

This commit is contained in:
Agus Zubiaga 2023-11-29 09:52:20 -03:00
parent ebfcd71e8d
commit 933fde77a0
No known key found for this signature in database
12 changed files with 117 additions and 25 deletions

View file

@ -0,0 +1,23 @@
Defs {
tags: [
Index(2147483648),
],
regions: [
@0-12,
],
space_before: [
Slice(start = 0, length = 0),
],
space_after: [
Slice(start = 0, length = 0),
],
spaces: [],
type_defs: [],
value_defs: [
ModuleImport {
name: @8-12 ModuleName(
"Json",
),
},
],
}

View file

@ -0,0 +1 @@
import Json

View file

@ -323,6 +323,7 @@ mod test_snapshots {
pass/highest_float.expr,
pass/highest_int.expr,
pass/if_def.expr,
pass/import.moduledefs,
pass/int_with_underscore.expr,
pass/interface_with_newline.header,
pass/lambda_in_chain.expr,
@ -568,6 +569,8 @@ mod test_snapshots {
Err(err) => Err(format!("{err:?}")),
};
println!("{:?}", result);
if expect == TestExpectation::Pass {
let tokens = roc_parse::highlight::highlight(&source);
for token in tokens {