@@ -65,11 +65,12 @@ struct _mod {
6565
6666enum _stmt_kind {FunctionDef_kind = 1 , AsyncFunctionDef_kind = 2 , ClassDef_kind = 3 ,
6767 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 };
68+ AugAssign_kind = 7 , AnnAssign_kind = 8 , For_kind = 9 ,
69+ AsyncFor_kind = 10 , While_kind = 11 , If_kind = 12 , With_kind = 13 ,
70+ AsyncWith_kind = 14 , Raise_kind = 15 , Try_kind = 16 ,
71+ Assert_kind = 17 , Import_kind = 18 , ImportFrom_kind = 19 ,
72+ Global_kind = 20 , Nonlocal_kind = 21 , Expr_kind = 22 , Pass_kind = 23 ,
73+ Break_kind = 24 , Continue_kind = 25 };
7374struct _stmt {
7475 enum _stmt_kind kind ;
7576 union {
@@ -116,6 +117,13 @@ struct _stmt {
116117 expr_ty value ;
117118 } AugAssign ;
118119
120+ struct {
121+ expr_ty target ;
122+ expr_ty annotation ;
123+ expr_ty value ;
124+ int simple ;
125+ } AnnAssign ;
126+
119127 struct {
120128 expr_ty target ;
121129 expr_ty iter ;
@@ -201,9 +209,10 @@ enum _expr_kind {BoolOp_kind=1, BinOp_kind=2, UnaryOp_kind=3, Lambda_kind=4,
201209 SetComp_kind = 9 , DictComp_kind = 10 , GeneratorExp_kind = 11 ,
202210 Await_kind = 12 , Yield_kind = 13 , YieldFrom_kind = 14 ,
203211 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 };
212+ FormattedValue_kind = 19 , JoinedStr_kind = 20 , Bytes_kind = 21 ,
213+ NameConstant_kind = 22 , Ellipsis_kind = 23 , Constant_kind = 24 ,
214+ Attribute_kind = 25 , Subscript_kind = 26 , Starred_kind = 27 ,
215+ Name_kind = 28 , List_kind = 29 , Tuple_kind = 30 };
207216struct _expr {
208217 enum _expr_kind kind ;
209218 union {
@@ -296,6 +305,16 @@ struct _expr {
296305 string s ;
297306 } Str ;
298307
308+ struct {
309+ expr_ty value ;
310+ int conversion ;
311+ expr_ty format_spec ;
312+ } FormattedValue ;
313+
314+ struct {
315+ asdl_seq * values ;
316+ } JoinedStr ;
317+
299318 struct {
300319 bytes s ;
301320 } Bytes ;
@@ -304,6 +323,10 @@ struct _expr {
304323 singleton value ;
305324 } NameConstant ;
306325
326+ struct {
327+ constant value ;
328+ } Constant ;
329+
307330 struct {
308331 expr_ty value ;
309332 identifier attr ;
@@ -366,6 +389,7 @@ struct _comprehension {
366389 expr_ty target ;
367390 expr_ty iter ;
368391 asdl_seq * ifs ;
392+ int is_async ;
369393};
370394
371395enum _excepthandler_kind {ExceptHandler_kind = 1 };
@@ -446,6 +470,9 @@ stmt_ty _Py_Assign(asdl_seq * targets, expr_ty value, int lineno, int
446470#define AugAssign (a0 , a1 , a2 , a3 , a4 , a5 ) _Py_AugAssign(a0, a1, a2, a3, a4, a5)
447471stmt_ty _Py_AugAssign (expr_ty target , operator_ty op , expr_ty value , int
448472 lineno , int col_offset , PyArena * arena );
473+ #define AnnAssign (a0 , a1 , a2 , a3 , a4 , a5 , a6 ) _Py_AnnAssign(a0, a1, a2, a3, a4, a5, a6)
474+ stmt_ty _Py_AnnAssign (expr_ty target , expr_ty annotation , expr_ty value , int
475+ simple , int lineno , int col_offset , PyArena * arena );
449476#define For (a0 , a1 , a2 , a3 , a4 , a5 , a6 ) _Py_For(a0, a1, a2, a3, a4, a5, a6)
450477stmt_ty _Py_For (expr_ty target , expr_ty iter , asdl_seq * body , asdl_seq *
451478 orelse , int lineno , int col_offset , PyArena * arena );
@@ -543,13 +570,22 @@ expr_ty _Py_Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, int
543570expr_ty _Py_Num (object n , int lineno , int col_offset , PyArena * arena );
544571#define Str (a0 , a1 , a2 , a3 ) _Py_Str(a0, a1, a2, a3)
545572expr_ty _Py_Str (string s , int lineno , int col_offset , PyArena * arena );
573+ #define FormattedValue (a0 , a1 , a2 , a3 , a4 , a5 ) _Py_FormattedValue(a0, a1, a2, a3, a4, a5)
574+ expr_ty _Py_FormattedValue (expr_ty value , int conversion , expr_ty format_spec ,
575+ int lineno , int col_offset , PyArena * arena );
576+ #define JoinedStr (a0 , a1 , a2 , a3 ) _Py_JoinedStr(a0, a1, a2, a3)
577+ expr_ty _Py_JoinedStr (asdl_seq * values , int lineno , int col_offset , PyArena
578+ * arena );
546579#define Bytes (a0 , a1 , a2 , a3 ) _Py_Bytes(a0, a1, a2, a3)
547580expr_ty _Py_Bytes (bytes s , int lineno , int col_offset , PyArena * arena );
548581#define NameConstant (a0 , a1 , a2 , a3 ) _Py_NameConstant(a0, a1, a2, a3)
549582expr_ty _Py_NameConstant (singleton value , int lineno , int col_offset , PyArena
550583 * arena );
551584#define Ellipsis (a0 , a1 , a2 ) _Py_Ellipsis(a0, a1, a2)
552585expr_ty _Py_Ellipsis (int lineno , int col_offset , PyArena * arena );
586+ #define Constant (a0 , a1 , a2 , a3 ) _Py_Constant(a0, a1, a2, a3)
587+ expr_ty _Py_Constant (constant value , int lineno , int col_offset , PyArena
588+ * arena );
553589#define Attribute (a0 , a1 , a2 , a3 , a4 , a5 ) _Py_Attribute(a0, a1, a2, a3, a4, a5)
554590expr_ty _Py_Attribute (expr_ty value , identifier attr , expr_context_ty ctx , int
555591 lineno , int col_offset , PyArena * arena );
@@ -574,9 +610,9 @@ slice_ty _Py_Slice(expr_ty lower, expr_ty upper, expr_ty step, PyArena *arena);
574610slice_ty _Py_ExtSlice (asdl_seq * dims , PyArena * arena );
575611#define Index (a0 , a1 ) _Py_Index(a0, a1)
576612slice_ty _Py_Index (expr_ty value , PyArena * arena );
577- #define comprehension (a0 , a1 , a2 , a3 ) _Py_comprehension(a0, a1, a2, a3)
613+ #define comprehension (a0 , a1 , a2 , a3 , a4 ) _Py_comprehension(a0, a1, a2, a3, a4 )
578614comprehension_ty _Py_comprehension (expr_ty target , expr_ty iter , asdl_seq *
579- ifs , PyArena * arena );
615+ ifs , int is_async , PyArena * arena );
580616#define ExceptHandler (a0 , a1 , a2 , a3 , a4 , a5 ) _Py_ExceptHandler(a0, a1, a2, a3, a4, a5)
581617excepthandler_ty _Py_ExceptHandler (expr_ty type , identifier name , asdl_seq *
582618 body , int lineno , int col_offset , PyArena
0 commit comments