diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2021-09-27 14:37:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-27 14:37:43 +0100 |
commit | e5f13ce5b48b551c09fdd0faeafa6ecf860de51c (patch) | |
tree | d53ec2b8a487a906024e139c106f2a1b21aa810a /Parser/parser.c | |
parent | a22be4943c119fecf5433d999227ff78fc2e5741 (diff) | |
download | cpython3-e5f13ce5b48b551c09fdd0faeafa6ecf860de51c.tar.gz |
bpo-43914: Correctly highlight SyntaxError exceptions for invalid generator expression in function calls (GH-28576)
Diffstat (limited to 'Parser/parser.c')
-rw-r--r-- | Parser/parser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Parser/parser.c b/Parser/parser.c index 3cea370c5a..beb2176e3b 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -17880,15 +17880,15 @@ invalid_arguments_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_arguments[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "args for_if_clauses")); expr_ty a; - asdl_comprehension_seq* for_if_clauses_var; + asdl_comprehension_seq* b; if ( (a = args_rule(p)) // args && - (for_if_clauses_var = for_if_clauses_rule(p)) // for_if_clauses + (b = for_if_clauses_rule(p)) // for_if_clauses ) { D(fprintf(stderr, "%*c+ invalid_arguments[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "args for_if_clauses")); - _res = _PyPegen_nonparen_genexp_in_call ( p , a ); + _res = _PyPegen_nonparen_genexp_in_call ( p , a , b ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; D(p->level--); |