Mercurial > python-compiler.rs
diff src/ast_type.rs @ 2:5fc7c2790d8c
Add class support.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 31 May 2016 02:31:55 +0100 |
parents | 211b0df72e64 |
children | 326d7f2a94d4 |
line wrap: on
line diff
--- a/src/ast_type.rs +++ b/src/ast_type.rs @@ -41,6 +41,9 @@ impl Visitor<Type> for Typing { fn visit_statement(&mut self, statement: Statement) -> Type { match statement { + Statement::ClassDef(name, classes, body) => { + Type::Bottom + }, Statement::FunctionDef(Expr::Name(name), arguments, body) => { let mut env = self.environment.pop().unwrap(); self.environment.push(env.clone());