Move some code around

This commit is contained in:
greg 2018-02-08 01:15:27 -08:00
parent 8bd399f97a
commit 21511f5120
1 changed files with 38 additions and 40 deletions

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())