Mercurial > python-compiler.rs
comparison src/ast_type.rs @ 8:94ff501bf336
Add ast.AugAssign.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 31 May 2016 04:34:42 +0100 |
parents | 680d15073f55 |
children |
comparison
equal
deleted
inserted
replaced
7:680d15073f55 | 8:94ff501bf336 |
---|---|
121 println!("{} => {:?}", name, type_); | 121 println!("{} => {:?}", name, type_); |
122 env.insert(name, type_.clone()); | 122 env.insert(name, type_.clone()); |
123 } | 123 } |
124 self.environment.push(env); | 124 self.environment.push(env); |
125 println!("{:?}", self.environment.clone()); | 125 println!("{:?}", self.environment.clone()); |
126 Type::Bottom | |
127 }, | |
128 Statement::AugAssign(target, op, value) => { | |
129 let value = self.visit_expr(value); | |
130 let target = self.visit_expr(target); | |
126 Type::Bottom | 131 Type::Bottom |
127 }, | 132 }, |
128 Statement::Return(expr) => { | 133 Statement::Return(expr) => { |
129 self.visit_expr(expr) | 134 self.visit_expr(expr) |
130 }, | 135 }, |