mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
Merged revisions 62047 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r62047 | georg.brandl | 2008-03-29 23:40:17 -0700 (Sat, 29 Mar 2008) | 2 lines Patch #2511: Give the "excepthandler" AST item proper attributes by making it a Sum. ........
This commit is contained in:
parent
d35759388b
commit
ad74aa8dc0
7 changed files with 141 additions and 109 deletions
|
@ -1431,12 +1431,12 @@ 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)
|
||||
if (!symtable_add_def(st, eh->name, DEF_LOCAL))
|
||||
if (eh->v.ExceptHandler.type)
|
||||
VISIT(st, expr, eh->v.ExceptHandler.type);
|
||||
if (eh->v.ExceptHandler.name)
|
||||
if (!symtable_add_def(st, eh->v.ExceptHandler.name, DEF_LOCAL))
|
||||
return 0;
|
||||
VISIT_SEQ(st, stmt, eh->body);
|
||||
VISIT_SEQ(st, stmt, eh->v.ExceptHandler.body);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue