mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Parse and format top-level import defs with no alias or exposed members
This commit is contained in:
parent
ebfcd71e8d
commit
933fde77a0
12 changed files with 117 additions and 25 deletions
|
@ -0,0 +1 @@
|
|||
import Json
|
|
@ -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",
|
||||
),
|
||||
},
|
||||
],
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
import Json
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue