@@ -63,12 +63,13 @@ struct _mod {
6363 } v ;
6464};
6565
66- enum _stmt_kind {FunctionDef_kind = 1 , ClassDef_kind = 2 , Return_kind = 3 ,
67- Delete_kind = 4 , Assign_kind = 5 , AugAssign_kind = 6 , For_kind = 7 ,
68- While_kind = 8 , If_kind = 9 , With_kind = 10 , Raise_kind = 11 ,
69- Try_kind = 12 , Assert_kind = 13 , Import_kind = 14 ,
70- ImportFrom_kind = 15 , Global_kind = 16 , Nonlocal_kind = 17 ,
71- Expr_kind = 18 , Pass_kind = 19 , Break_kind = 20 , Continue_kind = 21 };
66+ enum _stmt_kind {FunctionDef_kind = 1 , AsyncFunctionDef_kind = 2 , ClassDef_kind = 3 ,
67+ Return_kind = 4 , Delete_kind = 5 , Assign_kind = 6 ,
68+ AugAssign_kind = 7 , For_kind = 8 , AsyncFor_kind = 9 , While_kind = 10 ,
69+ If_kind = 11 , With_kind = 12 , AsyncWith_kind = 13 , Raise_kind = 14 ,
70+ Try_kind = 15 , Assert_kind = 16 , Import_kind = 17 ,
71+ ImportFrom_kind = 18 , Global_kind = 19 , Nonlocal_kind = 20 ,
72+ Expr_kind = 21 , Pass_kind = 22 , Break_kind = 23 , Continue_kind = 24 };
7273struct _stmt {
7374 enum _stmt_kind kind ;
7475 union {
@@ -80,6 +81,14 @@ struct _stmt {
8081 expr_ty returns ;
8182 } FunctionDef ;
8283
84+ struct {
85+ identifier name ;
86+ arguments_ty args ;
87+ asdl_seq * body ;
88+ asdl_seq * decorator_list ;
89+ expr_ty returns ;
90+ } AsyncFunctionDef ;
91+
8392 struct {
8493 identifier name ;
8594 asdl_seq * bases ;
@@ -114,6 +123,13 @@ struct _stmt {
114123 asdl_seq * orelse ;
115124 } For ;
116125
126+ struct {
127+ expr_ty target ;
128+ expr_ty iter ;
129+ asdl_seq * body ;
130+ asdl_seq * orelse ;
131+ } AsyncFor ;
132+
117133 struct {
118134 expr_ty test ;
119135 asdl_seq * body ;
@@ -131,6 +147,11 @@ struct _stmt {
131147 asdl_seq * body ;
132148 } With ;
133149
150+ struct {
151+ asdl_seq * items ;
152+ asdl_seq * body ;
153+ } AsyncWith ;
154+
134155 struct {
135156 expr_ty exc ;
136157 expr_ty cause ;
@@ -178,11 +199,11 @@ struct _stmt {
178199enum _expr_kind {BoolOp_kind = 1 , BinOp_kind = 2 , UnaryOp_kind = 3 , Lambda_kind = 4 ,
179200 IfExp_kind = 5 , Dict_kind = 6 , Set_kind = 7 , ListComp_kind = 8 ,
180201 SetComp_kind = 9 , DictComp_kind = 10 , GeneratorExp_kind = 11 ,
181- Yield_kind = 12 , YieldFrom_kind = 13 , Compare_kind = 14 ,
182- Call_kind = 15 , Num_kind = 16 , Str_kind = 17 , Bytes_kind = 18 ,
183- NameConstant_kind = 19 , Ellipsis_kind = 20 , Attribute_kind = 21 ,
184- Subscript_kind = 22 , Starred_kind = 23 , Name_kind = 24 ,
185- List_kind = 25 , Tuple_kind = 26 };
202+ Await_kind = 12 , Yield_kind = 13 , YieldFrom_kind = 14 ,
203+ Compare_kind = 15 , Call_kind = 16 , Num_kind = 17 , Str_kind = 18 ,
204+ Bytes_kind = 19 , NameConstant_kind = 20 , Ellipsis_kind = 21 ,
205+ Attribute_kind = 22 , Subscript_kind = 23 , Starred_kind = 24 ,
206+ Name_kind = 25 , List_kind = 26 , Tuple_kind = 27 };
186207struct _expr {
187208 enum _expr_kind kind ;
188209 union {
@@ -243,6 +264,10 @@ struct _expr {
243264 asdl_seq * generators ;
244265 } GeneratorExp ;
245266
267+ struct {
268+ expr_ty value ;
269+ } Await ;
270+
246271 struct {
247272 expr_ty value ;
248273 } Yield ;
@@ -402,6 +427,10 @@ mod_ty _Py_Suite(asdl_seq * body, PyArena *arena);
402427stmt_ty _Py_FunctionDef (identifier name , arguments_ty args , asdl_seq * body ,
403428 asdl_seq * decorator_list , expr_ty returns , int lineno ,
404429 int col_offset , PyArena * arena );
430+ #define AsyncFunctionDef (a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 ) _Py_AsyncFunctionDef(a0, a1, a2, a3, a4, a5, a6, a7)
431+ stmt_ty _Py_AsyncFunctionDef (identifier name , arguments_ty args , asdl_seq *
432+ body , asdl_seq * decorator_list , expr_ty returns ,
433+ int lineno , int col_offset , PyArena * arena );
405434#define ClassDef (a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 ) _Py_ClassDef(a0, a1, a2, a3, a4, a5, a6, a7)
406435stmt_ty _Py_ClassDef (identifier name , asdl_seq * bases , asdl_seq * keywords ,
407436 asdl_seq * body , asdl_seq * decorator_list , int lineno ,
@@ -420,6 +449,9 @@ stmt_ty _Py_AugAssign(expr_ty target, operator_ty op, expr_ty value, int
420449#define For (a0 , a1 , a2 , a3 , a4 , a5 , a6 ) _Py_For(a0, a1, a2, a3, a4, a5, a6)
421450stmt_ty _Py_For (expr_ty target , expr_ty iter , asdl_seq * body , asdl_seq *
422451 orelse , int lineno , int col_offset , PyArena * arena );
452+ #define AsyncFor (a0 , a1 , a2 , a3 , a4 , a5 , a6 ) _Py_AsyncFor(a0, a1, a2, a3, a4, a5, a6)
453+ stmt_ty _Py_AsyncFor (expr_ty target , expr_ty iter , asdl_seq * body , asdl_seq *
454+ orelse , int lineno , int col_offset , PyArena * arena );
423455#define While (a0 , a1 , a2 , a3 , a4 , a5 ) _Py_While(a0, a1, a2, a3, a4, a5)
424456stmt_ty _Py_While (expr_ty test , asdl_seq * body , asdl_seq * orelse , int lineno ,
425457 int col_offset , PyArena * arena );
@@ -429,6 +461,9 @@ stmt_ty _Py_If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno,
429461#define With (a0 , a1 , a2 , a3 , a4 ) _Py_With(a0, a1, a2, a3, a4)
430462stmt_ty _Py_With (asdl_seq * items , asdl_seq * body , int lineno , int col_offset ,
431463 PyArena * arena );
464+ #define AsyncWith (a0 , a1 , a2 , a3 , a4 ) _Py_AsyncWith(a0, a1, a2, a3, a4)
465+ stmt_ty _Py_AsyncWith (asdl_seq * items , asdl_seq * body , int lineno , int
466+ col_offset , PyArena * arena );
432467#define Raise (a0 , a1 , a2 , a3 , a4 ) _Py_Raise(a0, a1, a2, a3, a4)
433468stmt_ty _Py_Raise (expr_ty exc , expr_ty cause , int lineno , int col_offset ,
434469 PyArena * arena );
@@ -491,6 +526,8 @@ expr_ty _Py_DictComp(expr_ty key, expr_ty value, asdl_seq * generators, int
491526#define GeneratorExp (a0 , a1 , a2 , a3 , a4 ) _Py_GeneratorExp(a0, a1, a2, a3, a4)
492527expr_ty _Py_GeneratorExp (expr_ty elt , asdl_seq * generators , int lineno , int
493528 col_offset , PyArena * arena );
529+ #define Await (a0 , a1 , a2 , a3 ) _Py_Await(a0, a1, a2, a3)
530+ expr_ty _Py_Await (expr_ty value , int lineno , int col_offset , PyArena * arena );
494531#define Yield (a0 , a1 , a2 , a3 ) _Py_Yield(a0, a1, a2, a3)
495532expr_ty _Py_Yield (expr_ty value , int lineno , int col_offset , PyArena * arena );
496533#define YieldFrom (a0 , a1 , a2 , a3 ) _Py_YieldFrom(a0, a1, a2, a3)
0 commit comments