Mercurial > python-compiler.rs
diff src/main.rs @ 9:fa7e285f88e7
Add a scoping pass, associating each module/statement with a block.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 01 Jun 2016 22:17:28 +0100 |
parents | 211b0df72e64 |
children | 38b0d63697b1 |
line wrap: on
line diff
--- a/src/main.rs +++ b/src/main.rs @@ -5,9 +5,10 @@ mod python_parse; mod python_dump; mod python_ast; mod ast_convert; +mod ast_scope; mod ast_dump; //mod ast_rewrite; -mod ast_type; +//mod ast_type; use std::fs::File; use std::io::Read; @@ -49,6 +50,8 @@ fn main() { //python_dump::dump_module(&module); let module_ast = ast_convert::convert_ast("__main__".to_string(), &module); ast_dump::dump_ast(&module_ast); + let scoped_ast = ast_scope::scope_ast(vec!(module_ast)); + println!("{:#?}", scoped_ast); //ast_rewrite::rewrite_ast(module_ast); - ast_type::type_ast(module_ast); + //ast_type::type_ast(scoped_ast); }