mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Patch #2511: Give the "excepthandler" AST item proper attributes by making it a Sum.
This commit is contained in:
parent
c15317efcd
commit
a48f3ab895
6 changed files with 136 additions and 104 deletions
|
@ -1308,11 +1308,11 @@ symtable_visit_arguments(struct symtable *st, arguments_ty a)
|
|||
static int
|
||||
symtable_visit_excepthandler(struct symtable *st, excepthandler_ty eh)
|
||||
{
|
||||
if (eh->type)
|
||||
VISIT(st, expr, eh->type);
|
||||
if (eh->name)
|
||||
VISIT(st, expr, eh->name);
|
||||
VISIT_SEQ(st, stmt, eh->body);
|
||||
if (eh->v.ExceptHandler.type)
|
||||
VISIT(st, expr, eh->v.ExceptHandler.type);
|
||||
if (eh->v.ExceptHandler.name)
|
||||
VISIT(st, expr, eh->v.ExceptHandler.name);
|
||||
VISIT_SEQ(st, stmt, eh->v.ExceptHandler.body);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue