mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
New package
header syntax
Implements the new package header syntax as discussed in Zulip [1].
package [Csv] {
parser: "../parser/main.roc"
}
Old headers still parse and are automatically upgraded to the new
syntax by the formatter.
[1] 418444862
This commit is contained in:
parent
8dedd9f03c
commit
e3b600c282
16 changed files with 169 additions and 132 deletions
|
@ -4851,12 +4851,12 @@ fn build_package_header<'a>(
|
|||
module_timing: ModuleTiming,
|
||||
) -> Result<(ModuleId, PQModuleName<'a>, ModuleHeader<'a>), LoadingProblem<'a>> {
|
||||
let exposes = bumpalo::collections::Vec::from_iter_in(
|
||||
unspace(arena, header.exposes.item.items).iter().copied(),
|
||||
unspace(arena, header.exposes.items).iter().copied(),
|
||||
arena,
|
||||
);
|
||||
let packages = unspace(arena, header.packages.item.items);
|
||||
let packages = unspace(arena, header.packages.value.items);
|
||||
let exposes_ids = get_exposes_ids(
|
||||
header.exposes.item.items,
|
||||
header.exposes.items,
|
||||
arena,
|
||||
&module_ids,
|
||||
&ident_ids_by_module,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue