mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-20 20:10:24 +00:00
Parse hosted modules
This commit is contained in:
parent
8633cedf4d
commit
484ce2fbc9
5 changed files with 217 additions and 18 deletions
|
@ -72,6 +72,8 @@ pub enum EHeader<'a> {
|
|||
Requires(ERequires<'a>, Position),
|
||||
Packages(EPackages<'a>, Position),
|
||||
Effects(EEffects<'a>, Position),
|
||||
Generates(EGenerates, Position),
|
||||
GeneratesWith(EGeneratesWith, Position),
|
||||
|
||||
Space(BadInputError, Position),
|
||||
Start(Position),
|
||||
|
@ -202,6 +204,38 @@ pub enum EImports {
|
|||
SetEnd(Position),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum EGenerates {
|
||||
Open(Position),
|
||||
Generates(Position),
|
||||
IndentGenerates(Position),
|
||||
Identifier(Position),
|
||||
Space(BadInputError, Position),
|
||||
IndentTypeStart(Position),
|
||||
IndentTypeEnd(Position),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum EGeneratesWith {
|
||||
Open(Position),
|
||||
With(Position),
|
||||
IndentWith(Position),
|
||||
IndentListStart(Position),
|
||||
IndentListEnd(Position),
|
||||
ListStart(Position),
|
||||
ListEnd(Position),
|
||||
Identifier(Position),
|
||||
ExposingDot(Position),
|
||||
ShorthandDot(Position),
|
||||
Shorthand(Position),
|
||||
ModuleName(Position),
|
||||
Space(BadInputError, Position),
|
||||
IndentSetStart(Position),
|
||||
IndentSetEnd(Position),
|
||||
SetStart(Position),
|
||||
SetEnd(Position),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum BadInputError {
|
||||
HasTab,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue