diff src/python_ast.rs @ 71:2c1e2ce41263

Add ast.AsyncFor.
author Bastien Orivel <eijebong@bananium.fr>
date Mon, 13 Jun 2016 18:02:34 +0200
parents a73eaf42bea1
children 7ac23f4336b1
line wrap: on
line diff
--- a/src/python_ast.rs
+++ b/src/python_ast.rs
@@ -29,10 +29,9 @@ pub enum stmt {
     AugAssign(expr, operator, expr),
 
     // For(expr target, expr iter, stmt* body, stmt* orelse)
-    For(expr, expr, Vec<stmt>, Vec<stmt>),
-
     // AsyncFor(expr target, expr iter, stmt* body, stmt* orelse)
-    //AsyncFor(expr, expr, Vec<stmt>, Vec<stmt>),
+    // If the last field is true, then it's an AsyncFor.
+    For(expr, expr, Vec<stmt>, Vec<stmt>, bool),
 
     // While(expr test, stmt* body, stmt* orelse)
     While(expr, Vec<stmt>, Vec<stmt>),