summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/Python-ast.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/Include/Python-ast.h b/Include/Python-ast.h
index 6653b08..0ad788b 100644
--- a/Include/Python-ast.h
+++ b/Include/Python-ast.h
@@ -342,10 +342,17 @@ struct _comprehension {
asdl_seq *ifs;
};
+enum _excepthandler_kind {ExceptHandler_kind=1};
struct _excepthandler {
- expr_ty type;
- identifier name;
- asdl_seq *body;
+ enum _excepthandler_kind kind;
+ union {
+ struct {
+ expr_ty type;
+ identifier name;
+ asdl_seq *body;
+ } ExceptHandler;
+
+ } v;
int lineno;
int col_offset;
};
@@ -525,8 +532,8 @@ slice_ty _Py_Index(expr_ty value, PyArena *arena);
#define comprehension(a0, a1, a2, a3) _Py_comprehension(a0, a1, a2, a3)
comprehension_ty _Py_comprehension(expr_ty target, expr_ty iter, asdl_seq *
ifs, PyArena *arena);
-#define excepthandler(a0, a1, a2, a3, a4, a5) _Py_excepthandler(a0, a1, a2, a3, a4, a5)
-excepthandler_ty _Py_excepthandler(expr_ty type, identifier name, asdl_seq *
+#define ExceptHandler(a0, a1, a2, a3, a4, a5) _Py_ExceptHandler(a0, a1, a2, a3, a4, a5)
+excepthandler_ty _Py_ExceptHandler(expr_ty type, identifier name, asdl_seq *
body, int lineno, int col_offset, PyArena
*arena);
#define arguments(a0, a1, a2, a3, a4, a5, a6, a7, a8) _Py_arguments(a0, a1, a2, a3, a4, a5, a6, a7, a8)