Move some code around

This commit is contained in:
greg 2018-02-08 01:15:27 -08:00
parent 95c6a23bf1
commit 17dccf65c8

View File

@ -84,8 +84,7 @@ impl TypeContext {
for statement in ast.0.iter() {
match *statement {
Statement::ExpressionStatement(_) => (),
Statement::Declaration(ref decl) => {
match *decl {
Statement::Declaration(ref decl) => match *decl {
FuncSig(_) => (),
Impl { .. } => (),
TypeDecl(ref type_constructor, ref body) => {
@ -130,7 +129,6 @@ impl TypeContext {
}
}
}
}
fn lookup(&mut self, binding: &Rc<String>) -> Option<TypeContextEntry> {
let key = PathSpecifier(binding.clone());
self.symbol_table.get(&key).map(|entry| entry.clone())