mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Upgrade hosted header in the style module header
This commit is contained in:
parent
3f09235d6a
commit
631e59ce06
22 changed files with 256 additions and 185 deletions
|
@ -3952,17 +3952,25 @@ fn parse_header<'a>(
|
|||
},
|
||||
parse_state,
|
||||
)) => {
|
||||
let module_name = match opt_expected_module_name {
|
||||
Some(pq_name) => arena.alloc_str(pq_name.as_inner().as_str()),
|
||||
None => {
|
||||
// [modules-revamp] [privacy-changes] TODO: Support test/check on nested modules
|
||||
arena.alloc_str(filename.file_stem().unwrap().to_str().unwrap())
|
||||
}
|
||||
};
|
||||
|
||||
let info = HeaderInfo {
|
||||
filename,
|
||||
is_root_module,
|
||||
opt_shorthand,
|
||||
packages: &[],
|
||||
header_type: HeaderType::Hosted {
|
||||
name: header.name.value,
|
||||
exposes: unspace(arena, header.exposes.item.items),
|
||||
name: roc_parse::header::ModuleName::new(module_name),
|
||||
exposes: unspace(arena, header.exposes.items),
|
||||
},
|
||||
module_comments: comments,
|
||||
header_imports: Some(header.imports),
|
||||
header_imports: header.old_imports,
|
||||
};
|
||||
|
||||
let (module_id, _, header) =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue