comparison 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
comparison
equal deleted inserted replaced
8:94ff501bf336 9:fa7e285f88e7
3 mod python_tb; 3 mod python_tb;
4 mod python_parse; 4 mod python_parse;
5 mod python_dump; 5 mod python_dump;
6 mod python_ast; 6 mod python_ast;
7 mod ast_convert; 7 mod ast_convert;
8 mod ast_scope;
8 mod ast_dump; 9 mod ast_dump;
9 //mod ast_rewrite; 10 //mod ast_rewrite;
10 mod ast_type; 11 //mod ast_type;
11 12
12 use std::fs::File; 13 use std::fs::File;
13 use std::io::Read; 14 use std::io::Read;
14 15
15 fn main() { 16 fn main() {
47 }; 48 };
48 49
49 //python_dump::dump_module(&module); 50 //python_dump::dump_module(&module);
50 let module_ast = ast_convert::convert_ast("__main__".to_string(), &module); 51 let module_ast = ast_convert::convert_ast("__main__".to_string(), &module);
51 ast_dump::dump_ast(&module_ast); 52 ast_dump::dump_ast(&module_ast);
53 let scoped_ast = ast_scope::scope_ast(vec!(module_ast));
54 println!("{:#?}", scoped_ast);
52 //ast_rewrite::rewrite_ast(module_ast); 55 //ast_rewrite::rewrite_ast(module_ast);
53 ast_type::type_ast(module_ast); 56 //ast_type::type_ast(scoped_ast);
54 } 57 }