Isolate import handling code
This commit is contained in:
parent
41cad61e34
commit
9cd64d97a5
@ -21,7 +21,14 @@ impl<'a> ScopeResolver<'a> {
|
||||
match statement.kind {
|
||||
StatementKind::Declaration(ref decl) => self.decl(decl),
|
||||
StatementKind::Expression(ref expr) => self.expr(expr),
|
||||
StatementKind::Import(ImportSpecifier { ref path_components, ref imported_names, .. }) => {
|
||||
StatementKind::Import(ref spec) => self.import(spec),
|
||||
}?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn import(&mut self, import_spec: &ImportSpecifier) -> Result<(), String> {
|
||||
let ImportSpecifier { ref path_components, ref imported_names, .. } = &import_spec;
|
||||
match imported_names {
|
||||
ImportedNames::All => unimplemented!(),
|
||||
ImportedNames::LastOfPath => {
|
||||
@ -34,11 +41,6 @@ impl<'a> ScopeResolver<'a> {
|
||||
}
|
||||
ImportedNames::List(ref names) => unimplemented!()
|
||||
};
|
||||
//self.name_scope_stack.insert()
|
||||
Ok(())
|
||||
}
|
||||
}?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user