Mercurial > python-compiler.rs
diff src/ast_convert.rs @ 50:5edbc24b625f
Add ast.Continue.
author | Bastien Orivel <eijebong@bananium.fr> |
---|---|
date | Wed, 08 Jun 2016 17:21:57 +0200 |
parents | 141f1769e1f0 |
children | ded1907b7a69 |
line wrap: on
line diff
--- a/src/ast_convert.rs +++ b/src/ast_convert.rs @@ -442,6 +442,7 @@ fn parse_statement(py: Python, ast: PyOb let break_type = ast_module.get(py, "Break").unwrap(); let delete_type = ast_module.get(py, "Delete").unwrap(); let pass_type = ast_module.get(py, "Pass").unwrap(); + let continue_type = ast_module.get(py, "Continue").unwrap(); assert!(is_instance(&ast, &ast_type)); @@ -577,6 +578,8 @@ fn parse_statement(py: Python, ast: PyOb stmt::Delete(targets) } else if is_instance(&ast, &pass_type) { stmt::Pass + } else if is_instance(&ast, &continue_type) { + stmt::Continue } else { println!("stmt {}", ast); panic!()