Back-port of rev 61240 for issue #2238, fixing: Some syntax errors in *args

and **kwargs expressions could give bogus error messages.
This commit is contained in:
Sean Reifscheider 2008-03-20 17:39:31 +00:00
parent eff5a4e901
commit 4af861cb4e
3 changed files with 11 additions and 0 deletions

View file

@ -1878,10 +1878,14 @@ ast_for_call(struct compiling *c, const node *n, expr_ty func)
}
else if (TYPE(ch) == STAR) {
vararg = ast_for_expr(c, CHILD(n, i+1));
if (!vararg)
return NULL;
i++;
}
else if (TYPE(ch) == DOUBLESTAR) {
kwarg = ast_for_expr(c, CHILD(n, i+1));
if (!kwarg)
return NULL;
i++;
}
}