mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +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
|
@ -455,6 +455,11 @@ pub enum ValueDef<'a> {
|
|||
condition: &'a Loc<Expr<'a>>,
|
||||
preceding_comment: Region,
|
||||
},
|
||||
|
||||
/// e.g. `import [Req] as Http from InternalHttp`.
|
||||
ModuleImport {
|
||||
name: Loc<crate::header::ModuleName<'a>>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Default)]
|
||||
|
@ -1792,6 +1797,7 @@ impl<'a> Malformed for ValueDef<'a> {
|
|||
condition,
|
||||
preceding_comment: _,
|
||||
} => condition.is_malformed(),
|
||||
ValueDef::ModuleImport { name } => name.value.contains_dot(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue