mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Merged revisions 82400 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r82400 | mark.dickinson | 2010-06-30 17:27:57 +0100 (Wed, 30 Jun 2010) | 2 lines Issue #9125: Update parser module for "except ... as ..." syntax. ........
This commit is contained in:
parent
284bc0e711
commit
9f11f39758
3 changed files with 15 additions and 4 deletions
|
@ -2126,10 +2126,13 @@ validate_except_clause(node *tree)
|
|||
|
||||
if (res && (nch > 1))
|
||||
res = validate_test(CHILD(tree, 1));
|
||||
if (res && (nch == 4))
|
||||
res = (validate_comma(CHILD(tree, 2))
|
||||
&& validate_test(CHILD(tree, 3)));
|
||||
|
||||
if (res && (nch == 4)) {
|
||||
if (TYPE(CHILD(tree, 2)) == NAME)
|
||||
res = validate_name(CHILD(tree, 2), "as");
|
||||
else
|
||||
res = validate_comma(CHILD(tree, 2));
|
||||
res = res && validate_test(CHILD(tree, 3));
|
||||
}
|
||||
return (res);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue