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