mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Support both inline and header imports
Load will now convert header imports to inline import defs, so that we can support both temporarily.
This commit is contained in:
parent
7a53484479
commit
7ebfc6d06d
18 changed files with 235 additions and 121 deletions
|
@ -211,7 +211,6 @@ keywords! {
|
|||
RequiresKeyword => "requires",
|
||||
ProvidesKeyword => "provides",
|
||||
ToKeyword => "to",
|
||||
// [modules-revamp] TODO: Remove
|
||||
ImportsKeyword => "imports",
|
||||
}
|
||||
|
||||
|
@ -230,6 +229,9 @@ pub struct InterfaceHeader<'a> {
|
|||
pub imports: KeywordItem<'a, ImportsKeyword, Collection<'a, Loc<Spaced<'a, ImportsEntry<'a>>>>>,
|
||||
}
|
||||
|
||||
pub type ImportsKeywordItem<'a> = KeywordItem<'a, ImportsKeyword, ImportsCollection<'a>>;
|
||||
pub type ImportsCollection<'a> = Collection<'a, Loc<Spaced<'a, ImportsEntry<'a>>>>;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct HostedHeader<'a> {
|
||||
pub before_name: &'a [CommentOrNewline<'a>],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue