cl-interpret: Complain, rather than panic, on outlined module

This commit is contained in:
2024-07-11 02:48:35 -05:00
parent 58c5a01312
commit d692f6bb80
2 changed files with 6 additions and 5 deletions

View File

@@ -60,10 +60,11 @@ impl Interpret for Static {
}
impl Interpret for Module {
fn interpret(&self, env: &mut Environment) -> IResult<ConValue> {
let Self { name, kind } = self;
// TODO: Enter this module's namespace
match &self.kind {
match kind {
ModuleKind::Inline(file) => file.interpret(env),
ModuleKind::Outline => todo!("Load and parse external files"),
ModuleKind::Outline => Err(Error::Outlined(*name)),
}
}
}