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