jpayne@69: /* File automatically generated by Parser/asdl_c.py. */ jpayne@69: jpayne@69: #ifndef Py_PYTHON_AST_H jpayne@69: #define Py_PYTHON_AST_H jpayne@69: #ifdef __cplusplus jpayne@69: extern "C" { jpayne@69: #endif jpayne@69: jpayne@69: #include "asdl.h" jpayne@69: jpayne@69: #undef Yield /* undefine macro conflicting with */ jpayne@69: jpayne@69: typedef struct _mod *mod_ty; jpayne@69: jpayne@69: typedef struct _stmt *stmt_ty; jpayne@69: jpayne@69: typedef struct _expr *expr_ty; jpayne@69: jpayne@69: typedef enum _expr_context { Load=1, Store=2, Del=3, AugLoad=4, AugStore=5, jpayne@69: Param=6 } expr_context_ty; jpayne@69: jpayne@69: typedef struct _slice *slice_ty; jpayne@69: jpayne@69: typedef enum _boolop { And=1, Or=2 } boolop_ty; jpayne@69: jpayne@69: typedef enum _operator { Add=1, Sub=2, Mult=3, MatMult=4, Div=5, Mod=6, Pow=7, jpayne@69: LShift=8, RShift=9, BitOr=10, BitXor=11, BitAnd=12, jpayne@69: FloorDiv=13 } operator_ty; jpayne@69: jpayne@69: typedef enum _unaryop { Invert=1, Not=2, UAdd=3, USub=4 } unaryop_ty; jpayne@69: jpayne@69: typedef enum _cmpop { Eq=1, NotEq=2, Lt=3, LtE=4, Gt=5, GtE=6, Is=7, IsNot=8, jpayne@69: In=9, NotIn=10 } cmpop_ty; jpayne@69: jpayne@69: typedef struct _comprehension *comprehension_ty; jpayne@69: jpayne@69: typedef struct _excepthandler *excepthandler_ty; jpayne@69: jpayne@69: typedef struct _arguments *arguments_ty; jpayne@69: jpayne@69: typedef struct _arg *arg_ty; jpayne@69: jpayne@69: typedef struct _keyword *keyword_ty; jpayne@69: jpayne@69: typedef struct _alias *alias_ty; jpayne@69: jpayne@69: typedef struct _withitem *withitem_ty; jpayne@69: jpayne@69: typedef struct _type_ignore *type_ignore_ty; jpayne@69: jpayne@69: jpayne@69: enum _mod_kind {Module_kind=1, Interactive_kind=2, Expression_kind=3, jpayne@69: FunctionType_kind=4, Suite_kind=5}; jpayne@69: struct _mod { jpayne@69: enum _mod_kind kind; jpayne@69: union { jpayne@69: struct { jpayne@69: asdl_seq *body; jpayne@69: asdl_seq *type_ignores; jpayne@69: } Module; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *body; jpayne@69: } Interactive; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty body; jpayne@69: } Expression; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *argtypes; jpayne@69: expr_ty returns; jpayne@69: } FunctionType; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *body; jpayne@69: } Suite; jpayne@69: jpayne@69: } v; jpayne@69: }; jpayne@69: jpayne@69: enum _stmt_kind {FunctionDef_kind=1, AsyncFunctionDef_kind=2, ClassDef_kind=3, jpayne@69: Return_kind=4, Delete_kind=5, Assign_kind=6, jpayne@69: AugAssign_kind=7, AnnAssign_kind=8, For_kind=9, jpayne@69: AsyncFor_kind=10, While_kind=11, If_kind=12, With_kind=13, jpayne@69: AsyncWith_kind=14, Raise_kind=15, Try_kind=16, jpayne@69: Assert_kind=17, Import_kind=18, ImportFrom_kind=19, jpayne@69: Global_kind=20, Nonlocal_kind=21, Expr_kind=22, Pass_kind=23, jpayne@69: Break_kind=24, Continue_kind=25}; jpayne@69: struct _stmt { jpayne@69: enum _stmt_kind kind; jpayne@69: union { jpayne@69: struct { jpayne@69: identifier name; jpayne@69: arguments_ty args; jpayne@69: asdl_seq *body; jpayne@69: asdl_seq *decorator_list; jpayne@69: expr_ty returns; jpayne@69: string type_comment; jpayne@69: } FunctionDef; jpayne@69: jpayne@69: struct { jpayne@69: identifier name; jpayne@69: arguments_ty args; jpayne@69: asdl_seq *body; jpayne@69: asdl_seq *decorator_list; jpayne@69: expr_ty returns; jpayne@69: string type_comment; jpayne@69: } AsyncFunctionDef; jpayne@69: jpayne@69: struct { jpayne@69: identifier name; jpayne@69: asdl_seq *bases; jpayne@69: asdl_seq *keywords; jpayne@69: asdl_seq *body; jpayne@69: asdl_seq *decorator_list; jpayne@69: } ClassDef; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty value; jpayne@69: } Return; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *targets; jpayne@69: } Delete; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *targets; jpayne@69: expr_ty value; jpayne@69: string type_comment; jpayne@69: } Assign; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty target; jpayne@69: operator_ty op; jpayne@69: expr_ty value; jpayne@69: } AugAssign; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty target; jpayne@69: expr_ty annotation; jpayne@69: expr_ty value; jpayne@69: int simple; jpayne@69: } AnnAssign; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty target; jpayne@69: expr_ty iter; jpayne@69: asdl_seq *body; jpayne@69: asdl_seq *orelse; jpayne@69: string type_comment; jpayne@69: } For; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty target; jpayne@69: expr_ty iter; jpayne@69: asdl_seq *body; jpayne@69: asdl_seq *orelse; jpayne@69: string type_comment; jpayne@69: } AsyncFor; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty test; jpayne@69: asdl_seq *body; jpayne@69: asdl_seq *orelse; jpayne@69: } While; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty test; jpayne@69: asdl_seq *body; jpayne@69: asdl_seq *orelse; jpayne@69: } If; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *items; jpayne@69: asdl_seq *body; jpayne@69: string type_comment; jpayne@69: } With; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *items; jpayne@69: asdl_seq *body; jpayne@69: string type_comment; jpayne@69: } AsyncWith; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty exc; jpayne@69: expr_ty cause; jpayne@69: } Raise; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *body; jpayne@69: asdl_seq *handlers; jpayne@69: asdl_seq *orelse; jpayne@69: asdl_seq *finalbody; jpayne@69: } Try; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty test; jpayne@69: expr_ty msg; jpayne@69: } Assert; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *names; jpayne@69: } Import; jpayne@69: jpayne@69: struct { jpayne@69: identifier module; jpayne@69: asdl_seq *names; jpayne@69: int level; jpayne@69: } ImportFrom; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *names; jpayne@69: } Global; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *names; jpayne@69: } Nonlocal; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty value; jpayne@69: } Expr; jpayne@69: jpayne@69: } v; jpayne@69: int lineno; jpayne@69: int col_offset; jpayne@69: int end_lineno; jpayne@69: int end_col_offset; jpayne@69: }; jpayne@69: jpayne@69: enum _expr_kind {BoolOp_kind=1, NamedExpr_kind=2, BinOp_kind=3, UnaryOp_kind=4, jpayne@69: Lambda_kind=5, IfExp_kind=6, Dict_kind=7, Set_kind=8, jpayne@69: ListComp_kind=9, SetComp_kind=10, DictComp_kind=11, jpayne@69: GeneratorExp_kind=12, Await_kind=13, Yield_kind=14, jpayne@69: YieldFrom_kind=15, Compare_kind=16, Call_kind=17, jpayne@69: FormattedValue_kind=18, JoinedStr_kind=19, Constant_kind=20, jpayne@69: Attribute_kind=21, Subscript_kind=22, Starred_kind=23, jpayne@69: Name_kind=24, List_kind=25, Tuple_kind=26}; jpayne@69: struct _expr { jpayne@69: enum _expr_kind kind; jpayne@69: union { jpayne@69: struct { jpayne@69: boolop_ty op; jpayne@69: asdl_seq *values; jpayne@69: } BoolOp; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty target; jpayne@69: expr_ty value; jpayne@69: } NamedExpr; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty left; jpayne@69: operator_ty op; jpayne@69: expr_ty right; jpayne@69: } BinOp; jpayne@69: jpayne@69: struct { jpayne@69: unaryop_ty op; jpayne@69: expr_ty operand; jpayne@69: } UnaryOp; jpayne@69: jpayne@69: struct { jpayne@69: arguments_ty args; jpayne@69: expr_ty body; jpayne@69: } Lambda; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty test; jpayne@69: expr_ty body; jpayne@69: expr_ty orelse; jpayne@69: } IfExp; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *keys; jpayne@69: asdl_seq *values; jpayne@69: } Dict; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *elts; jpayne@69: } Set; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty elt; jpayne@69: asdl_seq *generators; jpayne@69: } ListComp; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty elt; jpayne@69: asdl_seq *generators; jpayne@69: } SetComp; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty key; jpayne@69: expr_ty value; jpayne@69: asdl_seq *generators; jpayne@69: } DictComp; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty elt; jpayne@69: asdl_seq *generators; jpayne@69: } GeneratorExp; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty value; jpayne@69: } Await; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty value; jpayne@69: } Yield; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty value; jpayne@69: } YieldFrom; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty left; jpayne@69: asdl_int_seq *ops; jpayne@69: asdl_seq *comparators; jpayne@69: } Compare; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty func; jpayne@69: asdl_seq *args; jpayne@69: asdl_seq *keywords; jpayne@69: } Call; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty value; jpayne@69: int conversion; jpayne@69: expr_ty format_spec; jpayne@69: } FormattedValue; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *values; jpayne@69: } JoinedStr; jpayne@69: jpayne@69: struct { jpayne@69: constant value; jpayne@69: string kind; jpayne@69: } Constant; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty value; jpayne@69: identifier attr; jpayne@69: expr_context_ty ctx; jpayne@69: } Attribute; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty value; jpayne@69: slice_ty slice; jpayne@69: expr_context_ty ctx; jpayne@69: } Subscript; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty value; jpayne@69: expr_context_ty ctx; jpayne@69: } Starred; jpayne@69: jpayne@69: struct { jpayne@69: identifier id; jpayne@69: expr_context_ty ctx; jpayne@69: } Name; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *elts; jpayne@69: expr_context_ty ctx; jpayne@69: } List; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *elts; jpayne@69: expr_context_ty ctx; jpayne@69: } Tuple; jpayne@69: jpayne@69: } v; jpayne@69: int lineno; jpayne@69: int col_offset; jpayne@69: int end_lineno; jpayne@69: int end_col_offset; jpayne@69: }; jpayne@69: jpayne@69: enum _slice_kind {Slice_kind=1, ExtSlice_kind=2, Index_kind=3}; jpayne@69: struct _slice { jpayne@69: enum _slice_kind kind; jpayne@69: union { jpayne@69: struct { jpayne@69: expr_ty lower; jpayne@69: expr_ty upper; jpayne@69: expr_ty step; jpayne@69: } Slice; jpayne@69: jpayne@69: struct { jpayne@69: asdl_seq *dims; jpayne@69: } ExtSlice; jpayne@69: jpayne@69: struct { jpayne@69: expr_ty value; jpayne@69: } Index; jpayne@69: jpayne@69: } v; jpayne@69: }; jpayne@69: jpayne@69: struct _comprehension { jpayne@69: expr_ty target; jpayne@69: expr_ty iter; jpayne@69: asdl_seq *ifs; jpayne@69: int is_async; jpayne@69: }; jpayne@69: jpayne@69: enum _excepthandler_kind {ExceptHandler_kind=1}; jpayne@69: struct _excepthandler { jpayne@69: enum _excepthandler_kind kind; jpayne@69: union { jpayne@69: struct { jpayne@69: expr_ty type; jpayne@69: identifier name; jpayne@69: asdl_seq *body; jpayne@69: } ExceptHandler; jpayne@69: jpayne@69: } v; jpayne@69: int lineno; jpayne@69: int col_offset; jpayne@69: int end_lineno; jpayne@69: int end_col_offset; jpayne@69: }; jpayne@69: jpayne@69: struct _arguments { jpayne@69: asdl_seq *posonlyargs; jpayne@69: asdl_seq *args; jpayne@69: arg_ty vararg; jpayne@69: asdl_seq *kwonlyargs; jpayne@69: asdl_seq *kw_defaults; jpayne@69: arg_ty kwarg; jpayne@69: asdl_seq *defaults; jpayne@69: }; jpayne@69: jpayne@69: struct _arg { jpayne@69: identifier arg; jpayne@69: expr_ty annotation; jpayne@69: string type_comment; jpayne@69: int lineno; jpayne@69: int col_offset; jpayne@69: int end_lineno; jpayne@69: int end_col_offset; jpayne@69: }; jpayne@69: jpayne@69: struct _keyword { jpayne@69: identifier arg; jpayne@69: expr_ty value; jpayne@69: }; jpayne@69: jpayne@69: struct _alias { jpayne@69: identifier name; jpayne@69: identifier asname; jpayne@69: }; jpayne@69: jpayne@69: struct _withitem { jpayne@69: expr_ty context_expr; jpayne@69: expr_ty optional_vars; jpayne@69: }; jpayne@69: jpayne@69: enum _type_ignore_kind {TypeIgnore_kind=1}; jpayne@69: struct _type_ignore { jpayne@69: enum _type_ignore_kind kind; jpayne@69: union { jpayne@69: struct { jpayne@69: int lineno; jpayne@69: string tag; jpayne@69: } TypeIgnore; jpayne@69: jpayne@69: } v; jpayne@69: }; jpayne@69: jpayne@69: jpayne@69: // Note: these macros affect function definitions, not only call sites. jpayne@69: #define Module(a0, a1, a2) _Py_Module(a0, a1, a2) jpayne@69: mod_ty _Py_Module(asdl_seq * body, asdl_seq * type_ignores, PyArena *arena); jpayne@69: #define Interactive(a0, a1) _Py_Interactive(a0, a1) jpayne@69: mod_ty _Py_Interactive(asdl_seq * body, PyArena *arena); jpayne@69: #define Expression(a0, a1) _Py_Expression(a0, a1) jpayne@69: mod_ty _Py_Expression(expr_ty body, PyArena *arena); jpayne@69: #define FunctionType(a0, a1, a2) _Py_FunctionType(a0, a1, a2) jpayne@69: mod_ty _Py_FunctionType(asdl_seq * argtypes, expr_ty returns, PyArena *arena); jpayne@69: #define Suite(a0, a1) _Py_Suite(a0, a1) jpayne@69: mod_ty _Py_Suite(asdl_seq * body, PyArena *arena); jpayne@69: #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: stmt_ty _Py_FunctionDef(identifier name, arguments_ty args, asdl_seq * body, jpayne@69: asdl_seq * decorator_list, expr_ty returns, string jpayne@69: type_comment, int lineno, int col_offset, int jpayne@69: end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #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: stmt_ty _Py_AsyncFunctionDef(identifier name, arguments_ty args, asdl_seq * jpayne@69: body, asdl_seq * decorator_list, expr_ty returns, jpayne@69: string type_comment, int lineno, int col_offset, jpayne@69: int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #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: stmt_ty _Py_ClassDef(identifier name, asdl_seq * bases, asdl_seq * keywords, jpayne@69: asdl_seq * body, asdl_seq * decorator_list, int lineno, jpayne@69: int col_offset, int end_lineno, int end_col_offset, jpayne@69: PyArena *arena); jpayne@69: #define Return(a0, a1, a2, a3, a4, a5) _Py_Return(a0, a1, a2, a3, a4, a5) jpayne@69: stmt_ty _Py_Return(expr_ty value, int lineno, int col_offset, int end_lineno, jpayne@69: int end_col_offset, PyArena *arena); jpayne@69: #define Delete(a0, a1, a2, a3, a4, a5) _Py_Delete(a0, a1, a2, a3, a4, a5) jpayne@69: stmt_ty _Py_Delete(asdl_seq * targets, int lineno, int col_offset, int jpayne@69: end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define Assign(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Assign(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: stmt_ty _Py_Assign(asdl_seq * targets, expr_ty value, string type_comment, int jpayne@69: lineno, int col_offset, int end_lineno, int end_col_offset, jpayne@69: PyArena *arena); jpayne@69: #define AugAssign(a0, a1, a2, a3, a4, a5, a6, a7) _Py_AugAssign(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: stmt_ty _Py_AugAssign(expr_ty target, operator_ty op, expr_ty value, int jpayne@69: lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #define AnnAssign(a0, a1, a2, a3, a4, a5, a6, a7, a8) _Py_AnnAssign(a0, a1, a2, a3, a4, a5, a6, a7, a8) jpayne@69: stmt_ty _Py_AnnAssign(expr_ty target, expr_ty annotation, expr_ty value, int jpayne@69: simple, int lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #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: stmt_ty _Py_For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq * jpayne@69: orelse, string type_comment, int lineno, int col_offset, int jpayne@69: end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #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: stmt_ty _Py_AsyncFor(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq * jpayne@69: orelse, string type_comment, int lineno, int col_offset, jpayne@69: int end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define While(a0, a1, a2, a3, a4, a5, a6, a7) _Py_While(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: stmt_ty _Py_While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, jpayne@69: int col_offset, int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define If(a0, a1, a2, a3, a4, a5, a6, a7) _Py_If(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: stmt_ty _Py_If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, jpayne@69: int col_offset, int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define With(a0, a1, a2, a3, a4, a5, a6, a7) _Py_With(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: stmt_ty _Py_With(asdl_seq * items, asdl_seq * body, string type_comment, int jpayne@69: lineno, int col_offset, int end_lineno, int end_col_offset, jpayne@69: PyArena *arena); jpayne@69: #define AsyncWith(a0, a1, a2, a3, a4, a5, a6, a7) _Py_AsyncWith(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: stmt_ty _Py_AsyncWith(asdl_seq * items, asdl_seq * body, string type_comment, jpayne@69: int lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #define Raise(a0, a1, a2, a3, a4, a5, a6) _Py_Raise(a0, a1, a2, a3, a4, a5, a6) jpayne@69: stmt_ty _Py_Raise(expr_ty exc, expr_ty cause, int lineno, int col_offset, int jpayne@69: end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define Try(a0, a1, a2, a3, a4, a5, a6, a7, a8) _Py_Try(a0, a1, a2, a3, a4, a5, a6, a7, a8) jpayne@69: stmt_ty _Py_Try(asdl_seq * body, asdl_seq * handlers, asdl_seq * orelse, jpayne@69: asdl_seq * finalbody, int lineno, int col_offset, int jpayne@69: end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define Assert(a0, a1, a2, a3, a4, a5, a6) _Py_Assert(a0, a1, a2, a3, a4, a5, a6) jpayne@69: stmt_ty _Py_Assert(expr_ty test, expr_ty msg, int lineno, int col_offset, int jpayne@69: end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define Import(a0, a1, a2, a3, a4, a5) _Py_Import(a0, a1, a2, a3, a4, a5) jpayne@69: stmt_ty _Py_Import(asdl_seq * names, int lineno, int col_offset, int jpayne@69: end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define ImportFrom(a0, a1, a2, a3, a4, a5, a6, a7) _Py_ImportFrom(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: stmt_ty _Py_ImportFrom(identifier module, asdl_seq * names, int level, int jpayne@69: lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #define Global(a0, a1, a2, a3, a4, a5) _Py_Global(a0, a1, a2, a3, a4, a5) jpayne@69: stmt_ty _Py_Global(asdl_seq * names, int lineno, int col_offset, int jpayne@69: end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define Nonlocal(a0, a1, a2, a3, a4, a5) _Py_Nonlocal(a0, a1, a2, a3, a4, a5) jpayne@69: stmt_ty _Py_Nonlocal(asdl_seq * names, int lineno, int col_offset, int jpayne@69: end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define Expr(a0, a1, a2, a3, a4, a5) _Py_Expr(a0, a1, a2, a3, a4, a5) jpayne@69: stmt_ty _Py_Expr(expr_ty value, int lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #define Pass(a0, a1, a2, a3, a4) _Py_Pass(a0, a1, a2, a3, a4) jpayne@69: stmt_ty _Py_Pass(int lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #define Break(a0, a1, a2, a3, a4) _Py_Break(a0, a1, a2, a3, a4) jpayne@69: stmt_ty _Py_Break(int lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #define Continue(a0, a1, a2, a3, a4) _Py_Continue(a0, a1, a2, a3, a4) jpayne@69: stmt_ty _Py_Continue(int lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #define BoolOp(a0, a1, a2, a3, a4, a5, a6) _Py_BoolOp(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_BoolOp(boolop_ty op, asdl_seq * values, int lineno, int col_offset, jpayne@69: int end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define NamedExpr(a0, a1, a2, a3, a4, a5, a6) _Py_NamedExpr(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_NamedExpr(expr_ty target, expr_ty value, int lineno, int jpayne@69: col_offset, int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define BinOp(a0, a1, a2, a3, a4, a5, a6, a7) _Py_BinOp(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: expr_ty _Py_BinOp(expr_ty left, operator_ty op, expr_ty right, int lineno, int jpayne@69: col_offset, int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define UnaryOp(a0, a1, a2, a3, a4, a5, a6) _Py_UnaryOp(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_UnaryOp(unaryop_ty op, expr_ty operand, int lineno, int col_offset, jpayne@69: int end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define Lambda(a0, a1, a2, a3, a4, a5, a6) _Py_Lambda(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_Lambda(arguments_ty args, expr_ty body, int lineno, int col_offset, jpayne@69: int end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define IfExp(a0, a1, a2, a3, a4, a5, a6, a7) _Py_IfExp(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: expr_ty _Py_IfExp(expr_ty test, expr_ty body, expr_ty orelse, int lineno, int jpayne@69: col_offset, int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define Dict(a0, a1, a2, a3, a4, a5, a6) _Py_Dict(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_Dict(asdl_seq * keys, asdl_seq * values, int lineno, int jpayne@69: col_offset, int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define Set(a0, a1, a2, a3, a4, a5) _Py_Set(a0, a1, a2, a3, a4, a5) jpayne@69: expr_ty _Py_Set(asdl_seq * elts, int lineno, int col_offset, int end_lineno, jpayne@69: int end_col_offset, PyArena *arena); jpayne@69: #define ListComp(a0, a1, a2, a3, a4, a5, a6) _Py_ListComp(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_ListComp(expr_ty elt, asdl_seq * generators, int lineno, int jpayne@69: col_offset, int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define SetComp(a0, a1, a2, a3, a4, a5, a6) _Py_SetComp(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_SetComp(expr_ty elt, asdl_seq * generators, int lineno, int jpayne@69: col_offset, int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define DictComp(a0, a1, a2, a3, a4, a5, a6, a7) _Py_DictComp(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: expr_ty _Py_DictComp(expr_ty key, expr_ty value, asdl_seq * generators, int jpayne@69: lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #define GeneratorExp(a0, a1, a2, a3, a4, a5, a6) _Py_GeneratorExp(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_GeneratorExp(expr_ty elt, asdl_seq * generators, int lineno, int jpayne@69: col_offset, int end_lineno, int end_col_offset, jpayne@69: PyArena *arena); jpayne@69: #define Await(a0, a1, a2, a3, a4, a5) _Py_Await(a0, a1, a2, a3, a4, a5) jpayne@69: expr_ty _Py_Await(expr_ty value, int lineno, int col_offset, int end_lineno, jpayne@69: int end_col_offset, PyArena *arena); jpayne@69: #define Yield(a0, a1, a2, a3, a4, a5) _Py_Yield(a0, a1, a2, a3, a4, a5) jpayne@69: expr_ty _Py_Yield(expr_ty value, int lineno, int col_offset, int end_lineno, jpayne@69: int end_col_offset, PyArena *arena); jpayne@69: #define YieldFrom(a0, a1, a2, a3, a4, a5) _Py_YieldFrom(a0, a1, a2, a3, a4, a5) jpayne@69: expr_ty _Py_YieldFrom(expr_ty value, int lineno, int col_offset, int jpayne@69: end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define Compare(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Compare(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: expr_ty _Py_Compare(expr_ty left, asdl_int_seq * ops, asdl_seq * comparators, jpayne@69: int lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #define Call(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Call(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: expr_ty _Py_Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, int jpayne@69: lineno, int col_offset, int end_lineno, int end_col_offset, jpayne@69: PyArena *arena); jpayne@69: #define FormattedValue(a0, a1, a2, a3, a4, a5, a6, a7) _Py_FormattedValue(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: expr_ty _Py_FormattedValue(expr_ty value, int conversion, expr_ty format_spec, jpayne@69: int lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #define JoinedStr(a0, a1, a2, a3, a4, a5) _Py_JoinedStr(a0, a1, a2, a3, a4, a5) jpayne@69: expr_ty _Py_JoinedStr(asdl_seq * values, int lineno, int col_offset, int jpayne@69: end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define Constant(a0, a1, a2, a3, a4, a5, a6) _Py_Constant(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_Constant(constant value, string kind, int lineno, int col_offset, jpayne@69: int end_lineno, int end_col_offset, PyArena *arena); jpayne@69: #define Attribute(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Attribute(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: expr_ty _Py_Attribute(expr_ty value, identifier attr, expr_context_ty ctx, int jpayne@69: lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #define Subscript(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Subscript(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: expr_ty _Py_Subscript(expr_ty value, slice_ty slice, expr_context_ty ctx, int jpayne@69: lineno, int col_offset, int end_lineno, int jpayne@69: end_col_offset, PyArena *arena); jpayne@69: #define Starred(a0, a1, a2, a3, a4, a5, a6) _Py_Starred(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_Starred(expr_ty value, expr_context_ty ctx, int lineno, int jpayne@69: col_offset, int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define Name(a0, a1, a2, a3, a4, a5, a6) _Py_Name(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_Name(identifier id, expr_context_ty ctx, int lineno, int jpayne@69: col_offset, int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define List(a0, a1, a2, a3, a4, a5, a6) _Py_List(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_List(asdl_seq * elts, expr_context_ty ctx, int lineno, int jpayne@69: col_offset, int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define Tuple(a0, a1, a2, a3, a4, a5, a6) _Py_Tuple(a0, a1, a2, a3, a4, a5, a6) jpayne@69: expr_ty _Py_Tuple(asdl_seq * elts, expr_context_ty ctx, int lineno, int jpayne@69: col_offset, int end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define Slice(a0, a1, a2, a3) _Py_Slice(a0, a1, a2, a3) jpayne@69: slice_ty _Py_Slice(expr_ty lower, expr_ty upper, expr_ty step, PyArena *arena); jpayne@69: #define ExtSlice(a0, a1) _Py_ExtSlice(a0, a1) jpayne@69: slice_ty _Py_ExtSlice(asdl_seq * dims, PyArena *arena); jpayne@69: #define Index(a0, a1) _Py_Index(a0, a1) jpayne@69: slice_ty _Py_Index(expr_ty value, PyArena *arena); jpayne@69: #define comprehension(a0, a1, a2, a3, a4) _Py_comprehension(a0, a1, a2, a3, a4) jpayne@69: comprehension_ty _Py_comprehension(expr_ty target, expr_ty iter, asdl_seq * jpayne@69: ifs, int is_async, PyArena *arena); jpayne@69: #define ExceptHandler(a0, a1, a2, a3, a4, a5, a6, a7) _Py_ExceptHandler(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: excepthandler_ty _Py_ExceptHandler(expr_ty type, identifier name, asdl_seq * jpayne@69: body, int lineno, int col_offset, int jpayne@69: end_lineno, int end_col_offset, PyArena jpayne@69: *arena); jpayne@69: #define arguments(a0, a1, a2, a3, a4, a5, a6, a7) _Py_arguments(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: arguments_ty _Py_arguments(asdl_seq * posonlyargs, asdl_seq * args, arg_ty jpayne@69: vararg, asdl_seq * kwonlyargs, asdl_seq * jpayne@69: kw_defaults, arg_ty kwarg, asdl_seq * defaults, jpayne@69: PyArena *arena); jpayne@69: #define arg(a0, a1, a2, a3, a4, a5, a6, a7) _Py_arg(a0, a1, a2, a3, a4, a5, a6, a7) jpayne@69: arg_ty _Py_arg(identifier arg, expr_ty annotation, string type_comment, int jpayne@69: lineno, int col_offset, int end_lineno, int end_col_offset, jpayne@69: PyArena *arena); jpayne@69: #define keyword(a0, a1, a2) _Py_keyword(a0, a1, a2) jpayne@69: keyword_ty _Py_keyword(identifier arg, expr_ty value, PyArena *arena); jpayne@69: #define alias(a0, a1, a2) _Py_alias(a0, a1, a2) jpayne@69: alias_ty _Py_alias(identifier name, identifier asname, PyArena *arena); jpayne@69: #define withitem(a0, a1, a2) _Py_withitem(a0, a1, a2) jpayne@69: withitem_ty _Py_withitem(expr_ty context_expr, expr_ty optional_vars, PyArena jpayne@69: *arena); jpayne@69: #define TypeIgnore(a0, a1, a2) _Py_TypeIgnore(a0, a1, a2) jpayne@69: type_ignore_ty _Py_TypeIgnore(int lineno, string tag, PyArena *arena); jpayne@69: jpayne@69: PyObject* PyAST_mod2obj(mod_ty t); jpayne@69: mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode); jpayne@69: int PyAST_Check(PyObject* obj); jpayne@69: jpayne@69: #ifdef __cplusplus jpayne@69: } jpayne@69: #endif jpayne@69: #endif /* !Py_PYTHON_AST_H */