annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/python3.8/Python-ast.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /* File automatically generated by Parser/asdl_c.py. */
jpayne@69 2
jpayne@69 3 #ifndef Py_PYTHON_AST_H
jpayne@69 4 #define Py_PYTHON_AST_H
jpayne@69 5 #ifdef __cplusplus
jpayne@69 6 extern "C" {
jpayne@69 7 #endif
jpayne@69 8
jpayne@69 9 #include "asdl.h"
jpayne@69 10
jpayne@69 11 #undef Yield /* undefine macro conflicting with <winbase.h> */
jpayne@69 12
jpayne@69 13 typedef struct _mod *mod_ty;
jpayne@69 14
jpayne@69 15 typedef struct _stmt *stmt_ty;
jpayne@69 16
jpayne@69 17 typedef struct _expr *expr_ty;
jpayne@69 18
jpayne@69 19 typedef enum _expr_context { Load=1, Store=2, Del=3, AugLoad=4, AugStore=5,
jpayne@69 20 Param=6 } expr_context_ty;
jpayne@69 21
jpayne@69 22 typedef struct _slice *slice_ty;
jpayne@69 23
jpayne@69 24 typedef enum _boolop { And=1, Or=2 } boolop_ty;
jpayne@69 25
jpayne@69 26 typedef enum _operator { Add=1, Sub=2, Mult=3, MatMult=4, Div=5, Mod=6, Pow=7,
jpayne@69 27 LShift=8, RShift=9, BitOr=10, BitXor=11, BitAnd=12,
jpayne@69 28 FloorDiv=13 } operator_ty;
jpayne@69 29
jpayne@69 30 typedef enum _unaryop { Invert=1, Not=2, UAdd=3, USub=4 } unaryop_ty;
jpayne@69 31
jpayne@69 32 typedef enum _cmpop { Eq=1, NotEq=2, Lt=3, LtE=4, Gt=5, GtE=6, Is=7, IsNot=8,
jpayne@69 33 In=9, NotIn=10 } cmpop_ty;
jpayne@69 34
jpayne@69 35 typedef struct _comprehension *comprehension_ty;
jpayne@69 36
jpayne@69 37 typedef struct _excepthandler *excepthandler_ty;
jpayne@69 38
jpayne@69 39 typedef struct _arguments *arguments_ty;
jpayne@69 40
jpayne@69 41 typedef struct _arg *arg_ty;
jpayne@69 42
jpayne@69 43 typedef struct _keyword *keyword_ty;
jpayne@69 44
jpayne@69 45 typedef struct _alias *alias_ty;
jpayne@69 46
jpayne@69 47 typedef struct _withitem *withitem_ty;
jpayne@69 48
jpayne@69 49 typedef struct _type_ignore *type_ignore_ty;
jpayne@69 50
jpayne@69 51
jpayne@69 52 enum _mod_kind {Module_kind=1, Interactive_kind=2, Expression_kind=3,
jpayne@69 53 FunctionType_kind=4, Suite_kind=5};
jpayne@69 54 struct _mod {
jpayne@69 55 enum _mod_kind kind;
jpayne@69 56 union {
jpayne@69 57 struct {
jpayne@69 58 asdl_seq *body;
jpayne@69 59 asdl_seq *type_ignores;
jpayne@69 60 } Module;
jpayne@69 61
jpayne@69 62 struct {
jpayne@69 63 asdl_seq *body;
jpayne@69 64 } Interactive;
jpayne@69 65
jpayne@69 66 struct {
jpayne@69 67 expr_ty body;
jpayne@69 68 } Expression;
jpayne@69 69
jpayne@69 70 struct {
jpayne@69 71 asdl_seq *argtypes;
jpayne@69 72 expr_ty returns;
jpayne@69 73 } FunctionType;
jpayne@69 74
jpayne@69 75 struct {
jpayne@69 76 asdl_seq *body;
jpayne@69 77 } Suite;
jpayne@69 78
jpayne@69 79 } v;
jpayne@69 80 };
jpayne@69 81
jpayne@69 82 enum _stmt_kind {FunctionDef_kind=1, AsyncFunctionDef_kind=2, ClassDef_kind=3,
jpayne@69 83 Return_kind=4, Delete_kind=5, Assign_kind=6,
jpayne@69 84 AugAssign_kind=7, AnnAssign_kind=8, For_kind=9,
jpayne@69 85 AsyncFor_kind=10, While_kind=11, If_kind=12, With_kind=13,
jpayne@69 86 AsyncWith_kind=14, Raise_kind=15, Try_kind=16,
jpayne@69 87 Assert_kind=17, Import_kind=18, ImportFrom_kind=19,
jpayne@69 88 Global_kind=20, Nonlocal_kind=21, Expr_kind=22, Pass_kind=23,
jpayne@69 89 Break_kind=24, Continue_kind=25};
jpayne@69 90 struct _stmt {
jpayne@69 91 enum _stmt_kind kind;
jpayne@69 92 union {
jpayne@69 93 struct {
jpayne@69 94 identifier name;
jpayne@69 95 arguments_ty args;
jpayne@69 96 asdl_seq *body;
jpayne@69 97 asdl_seq *decorator_list;
jpayne@69 98 expr_ty returns;
jpayne@69 99 string type_comment;
jpayne@69 100 } FunctionDef;
jpayne@69 101
jpayne@69 102 struct {
jpayne@69 103 identifier name;
jpayne@69 104 arguments_ty args;
jpayne@69 105 asdl_seq *body;
jpayne@69 106 asdl_seq *decorator_list;
jpayne@69 107 expr_ty returns;
jpayne@69 108 string type_comment;
jpayne@69 109 } AsyncFunctionDef;
jpayne@69 110
jpayne@69 111 struct {
jpayne@69 112 identifier name;
jpayne@69 113 asdl_seq *bases;
jpayne@69 114 asdl_seq *keywords;
jpayne@69 115 asdl_seq *body;
jpayne@69 116 asdl_seq *decorator_list;
jpayne@69 117 } ClassDef;
jpayne@69 118
jpayne@69 119 struct {
jpayne@69 120 expr_ty value;
jpayne@69 121 } Return;
jpayne@69 122
jpayne@69 123 struct {
jpayne@69 124 asdl_seq *targets;
jpayne@69 125 } Delete;
jpayne@69 126
jpayne@69 127 struct {
jpayne@69 128 asdl_seq *targets;
jpayne@69 129 expr_ty value;
jpayne@69 130 string type_comment;
jpayne@69 131 } Assign;
jpayne@69 132
jpayne@69 133 struct {
jpayne@69 134 expr_ty target;
jpayne@69 135 operator_ty op;
jpayne@69 136 expr_ty value;
jpayne@69 137 } AugAssign;
jpayne@69 138
jpayne@69 139 struct {
jpayne@69 140 expr_ty target;
jpayne@69 141 expr_ty annotation;
jpayne@69 142 expr_ty value;
jpayne@69 143 int simple;
jpayne@69 144 } AnnAssign;
jpayne@69 145
jpayne@69 146 struct {
jpayne@69 147 expr_ty target;
jpayne@69 148 expr_ty iter;
jpayne@69 149 asdl_seq *body;
jpayne@69 150 asdl_seq *orelse;
jpayne@69 151 string type_comment;
jpayne@69 152 } For;
jpayne@69 153
jpayne@69 154 struct {
jpayne@69 155 expr_ty target;
jpayne@69 156 expr_ty iter;
jpayne@69 157 asdl_seq *body;
jpayne@69 158 asdl_seq *orelse;
jpayne@69 159 string type_comment;
jpayne@69 160 } AsyncFor;
jpayne@69 161
jpayne@69 162 struct {
jpayne@69 163 expr_ty test;
jpayne@69 164 asdl_seq *body;
jpayne@69 165 asdl_seq *orelse;
jpayne@69 166 } While;
jpayne@69 167
jpayne@69 168 struct {
jpayne@69 169 expr_ty test;
jpayne@69 170 asdl_seq *body;
jpayne@69 171 asdl_seq *orelse;
jpayne@69 172 } If;
jpayne@69 173
jpayne@69 174 struct {
jpayne@69 175 asdl_seq *items;
jpayne@69 176 asdl_seq *body;
jpayne@69 177 string type_comment;
jpayne@69 178 } With;
jpayne@69 179
jpayne@69 180 struct {
jpayne@69 181 asdl_seq *items;
jpayne@69 182 asdl_seq *body;
jpayne@69 183 string type_comment;
jpayne@69 184 } AsyncWith;
jpayne@69 185
jpayne@69 186 struct {
jpayne@69 187 expr_ty exc;
jpayne@69 188 expr_ty cause;
jpayne@69 189 } Raise;
jpayne@69 190
jpayne@69 191 struct {
jpayne@69 192 asdl_seq *body;
jpayne@69 193 asdl_seq *handlers;
jpayne@69 194 asdl_seq *orelse;
jpayne@69 195 asdl_seq *finalbody;
jpayne@69 196 } Try;
jpayne@69 197
jpayne@69 198 struct {
jpayne@69 199 expr_ty test;
jpayne@69 200 expr_ty msg;
jpayne@69 201 } Assert;
jpayne@69 202
jpayne@69 203 struct {
jpayne@69 204 asdl_seq *names;
jpayne@69 205 } Import;
jpayne@69 206
jpayne@69 207 struct {
jpayne@69 208 identifier module;
jpayne@69 209 asdl_seq *names;
jpayne@69 210 int level;
jpayne@69 211 } ImportFrom;
jpayne@69 212
jpayne@69 213 struct {
jpayne@69 214 asdl_seq *names;
jpayne@69 215 } Global;
jpayne@69 216
jpayne@69 217 struct {
jpayne@69 218 asdl_seq *names;
jpayne@69 219 } Nonlocal;
jpayne@69 220
jpayne@69 221 struct {
jpayne@69 222 expr_ty value;
jpayne@69 223 } Expr;
jpayne@69 224
jpayne@69 225 } v;
jpayne@69 226 int lineno;
jpayne@69 227 int col_offset;
jpayne@69 228 int end_lineno;
jpayne@69 229 int end_col_offset;
jpayne@69 230 };
jpayne@69 231
jpayne@69 232 enum _expr_kind {BoolOp_kind=1, NamedExpr_kind=2, BinOp_kind=3, UnaryOp_kind=4,
jpayne@69 233 Lambda_kind=5, IfExp_kind=6, Dict_kind=7, Set_kind=8,
jpayne@69 234 ListComp_kind=9, SetComp_kind=10, DictComp_kind=11,
jpayne@69 235 GeneratorExp_kind=12, Await_kind=13, Yield_kind=14,
jpayne@69 236 YieldFrom_kind=15, Compare_kind=16, Call_kind=17,
jpayne@69 237 FormattedValue_kind=18, JoinedStr_kind=19, Constant_kind=20,
jpayne@69 238 Attribute_kind=21, Subscript_kind=22, Starred_kind=23,
jpayne@69 239 Name_kind=24, List_kind=25, Tuple_kind=26};
jpayne@69 240 struct _expr {
jpayne@69 241 enum _expr_kind kind;
jpayne@69 242 union {
jpayne@69 243 struct {
jpayne@69 244 boolop_ty op;
jpayne@69 245 asdl_seq *values;
jpayne@69 246 } BoolOp;
jpayne@69 247
jpayne@69 248 struct {
jpayne@69 249 expr_ty target;
jpayne@69 250 expr_ty value;
jpayne@69 251 } NamedExpr;
jpayne@69 252
jpayne@69 253 struct {
jpayne@69 254 expr_ty left;
jpayne@69 255 operator_ty op;
jpayne@69 256 expr_ty right;
jpayne@69 257 } BinOp;
jpayne@69 258
jpayne@69 259 struct {
jpayne@69 260 unaryop_ty op;
jpayne@69 261 expr_ty operand;
jpayne@69 262 } UnaryOp;
jpayne@69 263
jpayne@69 264 struct {
jpayne@69 265 arguments_ty args;
jpayne@69 266 expr_ty body;
jpayne@69 267 } Lambda;
jpayne@69 268
jpayne@69 269 struct {
jpayne@69 270 expr_ty test;
jpayne@69 271 expr_ty body;
jpayne@69 272 expr_ty orelse;
jpayne@69 273 } IfExp;
jpayne@69 274
jpayne@69 275 struct {
jpayne@69 276 asdl_seq *keys;
jpayne@69 277 asdl_seq *values;
jpayne@69 278 } Dict;
jpayne@69 279
jpayne@69 280 struct {
jpayne@69 281 asdl_seq *elts;
jpayne@69 282 } Set;
jpayne@69 283
jpayne@69 284 struct {
jpayne@69 285 expr_ty elt;
jpayne@69 286 asdl_seq *generators;
jpayne@69 287 } ListComp;
jpayne@69 288
jpayne@69 289 struct {
jpayne@69 290 expr_ty elt;
jpayne@69 291 asdl_seq *generators;
jpayne@69 292 } SetComp;
jpayne@69 293
jpayne@69 294 struct {
jpayne@69 295 expr_ty key;
jpayne@69 296 expr_ty value;
jpayne@69 297 asdl_seq *generators;
jpayne@69 298 } DictComp;
jpayne@69 299
jpayne@69 300 struct {
jpayne@69 301 expr_ty elt;
jpayne@69 302 asdl_seq *generators;
jpayne@69 303 } GeneratorExp;
jpayne@69 304
jpayne@69 305 struct {
jpayne@69 306 expr_ty value;
jpayne@69 307 } Await;
jpayne@69 308
jpayne@69 309 struct {
jpayne@69 310 expr_ty value;
jpayne@69 311 } Yield;
jpayne@69 312
jpayne@69 313 struct {
jpayne@69 314 expr_ty value;
jpayne@69 315 } YieldFrom;
jpayne@69 316
jpayne@69 317 struct {
jpayne@69 318 expr_ty left;
jpayne@69 319 asdl_int_seq *ops;
jpayne@69 320 asdl_seq *comparators;
jpayne@69 321 } Compare;
jpayne@69 322
jpayne@69 323 struct {
jpayne@69 324 expr_ty func;
jpayne@69 325 asdl_seq *args;
jpayne@69 326 asdl_seq *keywords;
jpayne@69 327 } Call;
jpayne@69 328
jpayne@69 329 struct {
jpayne@69 330 expr_ty value;
jpayne@69 331 int conversion;
jpayne@69 332 expr_ty format_spec;
jpayne@69 333 } FormattedValue;
jpayne@69 334
jpayne@69 335 struct {
jpayne@69 336 asdl_seq *values;
jpayne@69 337 } JoinedStr;
jpayne@69 338
jpayne@69 339 struct {
jpayne@69 340 constant value;
jpayne@69 341 string kind;
jpayne@69 342 } Constant;
jpayne@69 343
jpayne@69 344 struct {
jpayne@69 345 expr_ty value;
jpayne@69 346 identifier attr;
jpayne@69 347 expr_context_ty ctx;
jpayne@69 348 } Attribute;
jpayne@69 349
jpayne@69 350 struct {
jpayne@69 351 expr_ty value;
jpayne@69 352 slice_ty slice;
jpayne@69 353 expr_context_ty ctx;
jpayne@69 354 } Subscript;
jpayne@69 355
jpayne@69 356 struct {
jpayne@69 357 expr_ty value;
jpayne@69 358 expr_context_ty ctx;
jpayne@69 359 } Starred;
jpayne@69 360
jpayne@69 361 struct {
jpayne@69 362 identifier id;
jpayne@69 363 expr_context_ty ctx;
jpayne@69 364 } Name;
jpayne@69 365
jpayne@69 366 struct {
jpayne@69 367 asdl_seq *elts;
jpayne@69 368 expr_context_ty ctx;
jpayne@69 369 } List;
jpayne@69 370
jpayne@69 371 struct {
jpayne@69 372 asdl_seq *elts;
jpayne@69 373 expr_context_ty ctx;
jpayne@69 374 } Tuple;
jpayne@69 375
jpayne@69 376 } v;
jpayne@69 377 int lineno;
jpayne@69 378 int col_offset;
jpayne@69 379 int end_lineno;
jpayne@69 380 int end_col_offset;
jpayne@69 381 };
jpayne@69 382
jpayne@69 383 enum _slice_kind {Slice_kind=1, ExtSlice_kind=2, Index_kind=3};
jpayne@69 384 struct _slice {
jpayne@69 385 enum _slice_kind kind;
jpayne@69 386 union {
jpayne@69 387 struct {
jpayne@69 388 expr_ty lower;
jpayne@69 389 expr_ty upper;
jpayne@69 390 expr_ty step;
jpayne@69 391 } Slice;
jpayne@69 392
jpayne@69 393 struct {
jpayne@69 394 asdl_seq *dims;
jpayne@69 395 } ExtSlice;
jpayne@69 396
jpayne@69 397 struct {
jpayne@69 398 expr_ty value;
jpayne@69 399 } Index;
jpayne@69 400
jpayne@69 401 } v;
jpayne@69 402 };
jpayne@69 403
jpayne@69 404 struct _comprehension {
jpayne@69 405 expr_ty target;
jpayne@69 406 expr_ty iter;
jpayne@69 407 asdl_seq *ifs;
jpayne@69 408 int is_async;
jpayne@69 409 };
jpayne@69 410
jpayne@69 411 enum _excepthandler_kind {ExceptHandler_kind=1};
jpayne@69 412 struct _excepthandler {
jpayne@69 413 enum _excepthandler_kind kind;
jpayne@69 414 union {
jpayne@69 415 struct {
jpayne@69 416 expr_ty type;
jpayne@69 417 identifier name;
jpayne@69 418 asdl_seq *body;
jpayne@69 419 } ExceptHandler;
jpayne@69 420
jpayne@69 421 } v;
jpayne@69 422 int lineno;
jpayne@69 423 int col_offset;
jpayne@69 424 int end_lineno;
jpayne@69 425 int end_col_offset;
jpayne@69 426 };
jpayne@69 427
jpayne@69 428 struct _arguments {
jpayne@69 429 asdl_seq *posonlyargs;
jpayne@69 430 asdl_seq *args;
jpayne@69 431 arg_ty vararg;
jpayne@69 432 asdl_seq *kwonlyargs;
jpayne@69 433 asdl_seq *kw_defaults;
jpayne@69 434 arg_ty kwarg;
jpayne@69 435 asdl_seq *defaults;
jpayne@69 436 };
jpayne@69 437
jpayne@69 438 struct _arg {
jpayne@69 439 identifier arg;
jpayne@69 440 expr_ty annotation;
jpayne@69 441 string type_comment;
jpayne@69 442 int lineno;
jpayne@69 443 int col_offset;
jpayne@69 444 int end_lineno;
jpayne@69 445 int end_col_offset;
jpayne@69 446 };
jpayne@69 447
jpayne@69 448 struct _keyword {
jpayne@69 449 identifier arg;
jpayne@69 450 expr_ty value;
jpayne@69 451 };
jpayne@69 452
jpayne@69 453 struct _alias {
jpayne@69 454 identifier name;
jpayne@69 455 identifier asname;
jpayne@69 456 };
jpayne@69 457
jpayne@69 458 struct _withitem {
jpayne@69 459 expr_ty context_expr;
jpayne@69 460 expr_ty optional_vars;
jpayne@69 461 };
jpayne@69 462
jpayne@69 463 enum _type_ignore_kind {TypeIgnore_kind=1};
jpayne@69 464 struct _type_ignore {
jpayne@69 465 enum _type_ignore_kind kind;
jpayne@69 466 union {
jpayne@69 467 struct {
jpayne@69 468 int lineno;
jpayne@69 469 string tag;
jpayne@69 470 } TypeIgnore;
jpayne@69 471
jpayne@69 472 } v;
jpayne@69 473 };
jpayne@69 474
jpayne@69 475
jpayne@69 476 // Note: these macros affect function definitions, not only call sites.
jpayne@69 477 #define Module(a0, a1, a2) _Py_Module(a0, a1, a2)
jpayne@69 478 mod_ty _Py_Module(asdl_seq * body, asdl_seq * type_ignores, PyArena *arena);
jpayne@69 479 #define Interactive(a0, a1) _Py_Interactive(a0, a1)
jpayne@69 480 mod_ty _Py_Interactive(asdl_seq * body, PyArena *arena);
jpayne@69 481 #define Expression(a0, a1) _Py_Expression(a0, a1)
jpayne@69 482 mod_ty _Py_Expression(expr_ty body, PyArena *arena);
jpayne@69 483 #define FunctionType(a0, a1, a2) _Py_FunctionType(a0, a1, a2)
jpayne@69 484 mod_ty _Py_FunctionType(asdl_seq * argtypes, expr_ty returns, PyArena *arena);
jpayne@69 485 #define Suite(a0, a1) _Py_Suite(a0, a1)
jpayne@69 486 mod_ty _Py_Suite(asdl_seq * body, PyArena *arena);
jpayne@69 487 #define FunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) _Py_FunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
jpayne@69 488 stmt_ty _Py_FunctionDef(identifier name, arguments_ty args, asdl_seq * body,
jpayne@69 489 asdl_seq * decorator_list, expr_ty returns, string
jpayne@69 490 type_comment, int lineno, int col_offset, int
jpayne@69 491 end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 492 #define AsyncFunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) _Py_AsyncFunctionDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
jpayne@69 493 stmt_ty _Py_AsyncFunctionDef(identifier name, arguments_ty args, asdl_seq *
jpayne@69 494 body, asdl_seq * decorator_list, expr_ty returns,
jpayne@69 495 string type_comment, int lineno, int col_offset,
jpayne@69 496 int end_lineno, int end_col_offset, PyArena
jpayne@69 497 *arena);
jpayne@69 498 #define ClassDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) _Py_ClassDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
jpayne@69 499 stmt_ty _Py_ClassDef(identifier name, asdl_seq * bases, asdl_seq * keywords,
jpayne@69 500 asdl_seq * body, asdl_seq * decorator_list, int lineno,
jpayne@69 501 int col_offset, int end_lineno, int end_col_offset,
jpayne@69 502 PyArena *arena);
jpayne@69 503 #define Return(a0, a1, a2, a3, a4, a5) _Py_Return(a0, a1, a2, a3, a4, a5)
jpayne@69 504 stmt_ty _Py_Return(expr_ty value, int lineno, int col_offset, int end_lineno,
jpayne@69 505 int end_col_offset, PyArena *arena);
jpayne@69 506 #define Delete(a0, a1, a2, a3, a4, a5) _Py_Delete(a0, a1, a2, a3, a4, a5)
jpayne@69 507 stmt_ty _Py_Delete(asdl_seq * targets, int lineno, int col_offset, int
jpayne@69 508 end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 509 #define Assign(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Assign(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 510 stmt_ty _Py_Assign(asdl_seq * targets, expr_ty value, string type_comment, int
jpayne@69 511 lineno, int col_offset, int end_lineno, int end_col_offset,
jpayne@69 512 PyArena *arena);
jpayne@69 513 #define AugAssign(a0, a1, a2, a3, a4, a5, a6, a7) _Py_AugAssign(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 514 stmt_ty _Py_AugAssign(expr_ty target, operator_ty op, expr_ty value, int
jpayne@69 515 lineno, int col_offset, int end_lineno, int
jpayne@69 516 end_col_offset, PyArena *arena);
jpayne@69 517 #define AnnAssign(a0, a1, a2, a3, a4, a5, a6, a7, a8) _Py_AnnAssign(a0, a1, a2, a3, a4, a5, a6, a7, a8)
jpayne@69 518 stmt_ty _Py_AnnAssign(expr_ty target, expr_ty annotation, expr_ty value, int
jpayne@69 519 simple, int lineno, int col_offset, int end_lineno, int
jpayne@69 520 end_col_offset, PyArena *arena);
jpayne@69 521 #define For(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) _Py_For(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
jpayne@69 522 stmt_ty _Py_For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq *
jpayne@69 523 orelse, string type_comment, int lineno, int col_offset, int
jpayne@69 524 end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 525 #define AsyncFor(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) _Py_AsyncFor(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
jpayne@69 526 stmt_ty _Py_AsyncFor(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq *
jpayne@69 527 orelse, string type_comment, int lineno, int col_offset,
jpayne@69 528 int end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 529 #define While(a0, a1, a2, a3, a4, a5, a6, a7) _Py_While(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 530 stmt_ty _Py_While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno,
jpayne@69 531 int col_offset, int end_lineno, int end_col_offset, PyArena
jpayne@69 532 *arena);
jpayne@69 533 #define If(a0, a1, a2, a3, a4, a5, a6, a7) _Py_If(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 534 stmt_ty _Py_If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno,
jpayne@69 535 int col_offset, int end_lineno, int end_col_offset, PyArena
jpayne@69 536 *arena);
jpayne@69 537 #define With(a0, a1, a2, a3, a4, a5, a6, a7) _Py_With(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 538 stmt_ty _Py_With(asdl_seq * items, asdl_seq * body, string type_comment, int
jpayne@69 539 lineno, int col_offset, int end_lineno, int end_col_offset,
jpayne@69 540 PyArena *arena);
jpayne@69 541 #define AsyncWith(a0, a1, a2, a3, a4, a5, a6, a7) _Py_AsyncWith(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 542 stmt_ty _Py_AsyncWith(asdl_seq * items, asdl_seq * body, string type_comment,
jpayne@69 543 int lineno, int col_offset, int end_lineno, int
jpayne@69 544 end_col_offset, PyArena *arena);
jpayne@69 545 #define Raise(a0, a1, a2, a3, a4, a5, a6) _Py_Raise(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 546 stmt_ty _Py_Raise(expr_ty exc, expr_ty cause, int lineno, int col_offset, int
jpayne@69 547 end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 548 #define Try(a0, a1, a2, a3, a4, a5, a6, a7, a8) _Py_Try(a0, a1, a2, a3, a4, a5, a6, a7, a8)
jpayne@69 549 stmt_ty _Py_Try(asdl_seq * body, asdl_seq * handlers, asdl_seq * orelse,
jpayne@69 550 asdl_seq * finalbody, int lineno, int col_offset, int
jpayne@69 551 end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 552 #define Assert(a0, a1, a2, a3, a4, a5, a6) _Py_Assert(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 553 stmt_ty _Py_Assert(expr_ty test, expr_ty msg, int lineno, int col_offset, int
jpayne@69 554 end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 555 #define Import(a0, a1, a2, a3, a4, a5) _Py_Import(a0, a1, a2, a3, a4, a5)
jpayne@69 556 stmt_ty _Py_Import(asdl_seq * names, int lineno, int col_offset, int
jpayne@69 557 end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 558 #define ImportFrom(a0, a1, a2, a3, a4, a5, a6, a7) _Py_ImportFrom(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 559 stmt_ty _Py_ImportFrom(identifier module, asdl_seq * names, int level, int
jpayne@69 560 lineno, int col_offset, int end_lineno, int
jpayne@69 561 end_col_offset, PyArena *arena);
jpayne@69 562 #define Global(a0, a1, a2, a3, a4, a5) _Py_Global(a0, a1, a2, a3, a4, a5)
jpayne@69 563 stmt_ty _Py_Global(asdl_seq * names, int lineno, int col_offset, int
jpayne@69 564 end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 565 #define Nonlocal(a0, a1, a2, a3, a4, a5) _Py_Nonlocal(a0, a1, a2, a3, a4, a5)
jpayne@69 566 stmt_ty _Py_Nonlocal(asdl_seq * names, int lineno, int col_offset, int
jpayne@69 567 end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 568 #define Expr(a0, a1, a2, a3, a4, a5) _Py_Expr(a0, a1, a2, a3, a4, a5)
jpayne@69 569 stmt_ty _Py_Expr(expr_ty value, int lineno, int col_offset, int end_lineno, int
jpayne@69 570 end_col_offset, PyArena *arena);
jpayne@69 571 #define Pass(a0, a1, a2, a3, a4) _Py_Pass(a0, a1, a2, a3, a4)
jpayne@69 572 stmt_ty _Py_Pass(int lineno, int col_offset, int end_lineno, int
jpayne@69 573 end_col_offset, PyArena *arena);
jpayne@69 574 #define Break(a0, a1, a2, a3, a4) _Py_Break(a0, a1, a2, a3, a4)
jpayne@69 575 stmt_ty _Py_Break(int lineno, int col_offset, int end_lineno, int
jpayne@69 576 end_col_offset, PyArena *arena);
jpayne@69 577 #define Continue(a0, a1, a2, a3, a4) _Py_Continue(a0, a1, a2, a3, a4)
jpayne@69 578 stmt_ty _Py_Continue(int lineno, int col_offset, int end_lineno, int
jpayne@69 579 end_col_offset, PyArena *arena);
jpayne@69 580 #define BoolOp(a0, a1, a2, a3, a4, a5, a6) _Py_BoolOp(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 581 expr_ty _Py_BoolOp(boolop_ty op, asdl_seq * values, int lineno, int col_offset,
jpayne@69 582 int end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 583 #define NamedExpr(a0, a1, a2, a3, a4, a5, a6) _Py_NamedExpr(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 584 expr_ty _Py_NamedExpr(expr_ty target, expr_ty value, int lineno, int
jpayne@69 585 col_offset, int end_lineno, int end_col_offset, PyArena
jpayne@69 586 *arena);
jpayne@69 587 #define BinOp(a0, a1, a2, a3, a4, a5, a6, a7) _Py_BinOp(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 588 expr_ty _Py_BinOp(expr_ty left, operator_ty op, expr_ty right, int lineno, int
jpayne@69 589 col_offset, int end_lineno, int end_col_offset, PyArena
jpayne@69 590 *arena);
jpayne@69 591 #define UnaryOp(a0, a1, a2, a3, a4, a5, a6) _Py_UnaryOp(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 592 expr_ty _Py_UnaryOp(unaryop_ty op, expr_ty operand, int lineno, int col_offset,
jpayne@69 593 int end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 594 #define Lambda(a0, a1, a2, a3, a4, a5, a6) _Py_Lambda(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 595 expr_ty _Py_Lambda(arguments_ty args, expr_ty body, int lineno, int col_offset,
jpayne@69 596 int end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 597 #define IfExp(a0, a1, a2, a3, a4, a5, a6, a7) _Py_IfExp(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 598 expr_ty _Py_IfExp(expr_ty test, expr_ty body, expr_ty orelse, int lineno, int
jpayne@69 599 col_offset, int end_lineno, int end_col_offset, PyArena
jpayne@69 600 *arena);
jpayne@69 601 #define Dict(a0, a1, a2, a3, a4, a5, a6) _Py_Dict(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 602 expr_ty _Py_Dict(asdl_seq * keys, asdl_seq * values, int lineno, int
jpayne@69 603 col_offset, int end_lineno, int end_col_offset, PyArena
jpayne@69 604 *arena);
jpayne@69 605 #define Set(a0, a1, a2, a3, a4, a5) _Py_Set(a0, a1, a2, a3, a4, a5)
jpayne@69 606 expr_ty _Py_Set(asdl_seq * elts, int lineno, int col_offset, int end_lineno,
jpayne@69 607 int end_col_offset, PyArena *arena);
jpayne@69 608 #define ListComp(a0, a1, a2, a3, a4, a5, a6) _Py_ListComp(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 609 expr_ty _Py_ListComp(expr_ty elt, asdl_seq * generators, int lineno, int
jpayne@69 610 col_offset, int end_lineno, int end_col_offset, PyArena
jpayne@69 611 *arena);
jpayne@69 612 #define SetComp(a0, a1, a2, a3, a4, a5, a6) _Py_SetComp(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 613 expr_ty _Py_SetComp(expr_ty elt, asdl_seq * generators, int lineno, int
jpayne@69 614 col_offset, int end_lineno, int end_col_offset, PyArena
jpayne@69 615 *arena);
jpayne@69 616 #define DictComp(a0, a1, a2, a3, a4, a5, a6, a7) _Py_DictComp(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 617 expr_ty _Py_DictComp(expr_ty key, expr_ty value, asdl_seq * generators, int
jpayne@69 618 lineno, int col_offset, int end_lineno, int
jpayne@69 619 end_col_offset, PyArena *arena);
jpayne@69 620 #define GeneratorExp(a0, a1, a2, a3, a4, a5, a6) _Py_GeneratorExp(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 621 expr_ty _Py_GeneratorExp(expr_ty elt, asdl_seq * generators, int lineno, int
jpayne@69 622 col_offset, int end_lineno, int end_col_offset,
jpayne@69 623 PyArena *arena);
jpayne@69 624 #define Await(a0, a1, a2, a3, a4, a5) _Py_Await(a0, a1, a2, a3, a4, a5)
jpayne@69 625 expr_ty _Py_Await(expr_ty value, int lineno, int col_offset, int end_lineno,
jpayne@69 626 int end_col_offset, PyArena *arena);
jpayne@69 627 #define Yield(a0, a1, a2, a3, a4, a5) _Py_Yield(a0, a1, a2, a3, a4, a5)
jpayne@69 628 expr_ty _Py_Yield(expr_ty value, int lineno, int col_offset, int end_lineno,
jpayne@69 629 int end_col_offset, PyArena *arena);
jpayne@69 630 #define YieldFrom(a0, a1, a2, a3, a4, a5) _Py_YieldFrom(a0, a1, a2, a3, a4, a5)
jpayne@69 631 expr_ty _Py_YieldFrom(expr_ty value, int lineno, int col_offset, int
jpayne@69 632 end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 633 #define Compare(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Compare(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 634 expr_ty _Py_Compare(expr_ty left, asdl_int_seq * ops, asdl_seq * comparators,
jpayne@69 635 int lineno, int col_offset, int end_lineno, int
jpayne@69 636 end_col_offset, PyArena *arena);
jpayne@69 637 #define Call(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Call(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 638 expr_ty _Py_Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, int
jpayne@69 639 lineno, int col_offset, int end_lineno, int end_col_offset,
jpayne@69 640 PyArena *arena);
jpayne@69 641 #define FormattedValue(a0, a1, a2, a3, a4, a5, a6, a7) _Py_FormattedValue(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 642 expr_ty _Py_FormattedValue(expr_ty value, int conversion, expr_ty format_spec,
jpayne@69 643 int lineno, int col_offset, int end_lineno, int
jpayne@69 644 end_col_offset, PyArena *arena);
jpayne@69 645 #define JoinedStr(a0, a1, a2, a3, a4, a5) _Py_JoinedStr(a0, a1, a2, a3, a4, a5)
jpayne@69 646 expr_ty _Py_JoinedStr(asdl_seq * values, int lineno, int col_offset, int
jpayne@69 647 end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 648 #define Constant(a0, a1, a2, a3, a4, a5, a6) _Py_Constant(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 649 expr_ty _Py_Constant(constant value, string kind, int lineno, int col_offset,
jpayne@69 650 int end_lineno, int end_col_offset, PyArena *arena);
jpayne@69 651 #define Attribute(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Attribute(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 652 expr_ty _Py_Attribute(expr_ty value, identifier attr, expr_context_ty ctx, int
jpayne@69 653 lineno, int col_offset, int end_lineno, int
jpayne@69 654 end_col_offset, PyArena *arena);
jpayne@69 655 #define Subscript(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Subscript(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 656 expr_ty _Py_Subscript(expr_ty value, slice_ty slice, expr_context_ty ctx, int
jpayne@69 657 lineno, int col_offset, int end_lineno, int
jpayne@69 658 end_col_offset, PyArena *arena);
jpayne@69 659 #define Starred(a0, a1, a2, a3, a4, a5, a6) _Py_Starred(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 660 expr_ty _Py_Starred(expr_ty value, expr_context_ty ctx, int lineno, int
jpayne@69 661 col_offset, int end_lineno, int end_col_offset, PyArena
jpayne@69 662 *arena);
jpayne@69 663 #define Name(a0, a1, a2, a3, a4, a5, a6) _Py_Name(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 664 expr_ty _Py_Name(identifier id, expr_context_ty ctx, int lineno, int
jpayne@69 665 col_offset, int end_lineno, int end_col_offset, PyArena
jpayne@69 666 *arena);
jpayne@69 667 #define List(a0, a1, a2, a3, a4, a5, a6) _Py_List(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 668 expr_ty _Py_List(asdl_seq * elts, expr_context_ty ctx, int lineno, int
jpayne@69 669 col_offset, int end_lineno, int end_col_offset, PyArena
jpayne@69 670 *arena);
jpayne@69 671 #define Tuple(a0, a1, a2, a3, a4, a5, a6) _Py_Tuple(a0, a1, a2, a3, a4, a5, a6)
jpayne@69 672 expr_ty _Py_Tuple(asdl_seq * elts, expr_context_ty ctx, int lineno, int
jpayne@69 673 col_offset, int end_lineno, int end_col_offset, PyArena
jpayne@69 674 *arena);
jpayne@69 675 #define Slice(a0, a1, a2, a3) _Py_Slice(a0, a1, a2, a3)
jpayne@69 676 slice_ty _Py_Slice(expr_ty lower, expr_ty upper, expr_ty step, PyArena *arena);
jpayne@69 677 #define ExtSlice(a0, a1) _Py_ExtSlice(a0, a1)
jpayne@69 678 slice_ty _Py_ExtSlice(asdl_seq * dims, PyArena *arena);
jpayne@69 679 #define Index(a0, a1) _Py_Index(a0, a1)
jpayne@69 680 slice_ty _Py_Index(expr_ty value, PyArena *arena);
jpayne@69 681 #define comprehension(a0, a1, a2, a3, a4) _Py_comprehension(a0, a1, a2, a3, a4)
jpayne@69 682 comprehension_ty _Py_comprehension(expr_ty target, expr_ty iter, asdl_seq *
jpayne@69 683 ifs, int is_async, PyArena *arena);
jpayne@69 684 #define ExceptHandler(a0, a1, a2, a3, a4, a5, a6, a7) _Py_ExceptHandler(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 685 excepthandler_ty _Py_ExceptHandler(expr_ty type, identifier name, asdl_seq *
jpayne@69 686 body, int lineno, int col_offset, int
jpayne@69 687 end_lineno, int end_col_offset, PyArena
jpayne@69 688 *arena);
jpayne@69 689 #define arguments(a0, a1, a2, a3, a4, a5, a6, a7) _Py_arguments(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 690 arguments_ty _Py_arguments(asdl_seq * posonlyargs, asdl_seq * args, arg_ty
jpayne@69 691 vararg, asdl_seq * kwonlyargs, asdl_seq *
jpayne@69 692 kw_defaults, arg_ty kwarg, asdl_seq * defaults,
jpayne@69 693 PyArena *arena);
jpayne@69 694 #define arg(a0, a1, a2, a3, a4, a5, a6, a7) _Py_arg(a0, a1, a2, a3, a4, a5, a6, a7)
jpayne@69 695 arg_ty _Py_arg(identifier arg, expr_ty annotation, string type_comment, int
jpayne@69 696 lineno, int col_offset, int end_lineno, int end_col_offset,
jpayne@69 697 PyArena *arena);
jpayne@69 698 #define keyword(a0, a1, a2) _Py_keyword(a0, a1, a2)
jpayne@69 699 keyword_ty _Py_keyword(identifier arg, expr_ty value, PyArena *arena);
jpayne@69 700 #define alias(a0, a1, a2) _Py_alias(a0, a1, a2)
jpayne@69 701 alias_ty _Py_alias(identifier name, identifier asname, PyArena *arena);
jpayne@69 702 #define withitem(a0, a1, a2) _Py_withitem(a0, a1, a2)
jpayne@69 703 withitem_ty _Py_withitem(expr_ty context_expr, expr_ty optional_vars, PyArena
jpayne@69 704 *arena);
jpayne@69 705 #define TypeIgnore(a0, a1, a2) _Py_TypeIgnore(a0, a1, a2)
jpayne@69 706 type_ignore_ty _Py_TypeIgnore(int lineno, string tag, PyArena *arena);
jpayne@69 707
jpayne@69 708 PyObject* PyAST_mod2obj(mod_ty t);
jpayne@69 709 mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode);
jpayne@69 710 int PyAST_Check(PyObject* obj);
jpayne@69 711
jpayne@69 712 #ifdef __cplusplus
jpayne@69 713 }
jpayne@69 714 #endif
jpayne@69 715 #endif /* !Py_PYTHON_AST_H */