diff options
author | Guido van Rossum <guido@python.org> | 2020-04-30 10:54:29 -0700 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2020-04-30 10:54:29 -0700 |
commit | fecd8e89615371813bd01440155ac47ff7342220 (patch) | |
tree | bba1634aea815794c80a8e241264137a22ca0bd4 | |
parent | d081578207a9a61a158501a41d81975dfa1e365c (diff) | |
download | cpython-git-type-comments.tar.gz |
Add CHECK() around _PyPegen_seq_append_to_end() calltype-comments
-rw-r--r-- | Grammar/python.gram | 2 | ||||
-rw-r--r-- | Parser/pegen/parse.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram index fc92045c34..e1164d990a 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -37,7 +37,7 @@ fstring[expr_ty]: star_expressions # type_expressions allow */** but ignore them type_expressions[asdl_seq*]: | a=','.expression+ ',' '*' b=expression ',' '**' c=expression { - _PyPegen_seq_append_to_end(p, _PyPegen_seq_append_to_end(p, a, b), c) } + _PyPegen_seq_append_to_end(p, CHECK(_PyPegen_seq_append_to_end(p, a, b)), c) } | a=','.expression+ ',' '*' b=expression { _PyPegen_seq_append_to_end(p, a, b) } | a=','.expression+ ',' '**' b=expression { _PyPegen_seq_append_to_end(p, a, b) } | ','.expression+ diff --git a/Parser/pegen/parse.c b/Parser/pegen/parse.c index 7208370ca3..8ff9a70d3b 100644 --- a/Parser/pegen/parse.c +++ b/Parser/pegen/parse.c @@ -856,7 +856,7 @@ type_expressions_rule(Parser *p) (c = expression_rule(p)) ) { - res = _PyPegen_seq_append_to_end ( p , _PyPegen_seq_append_to_end ( p , a , b ) , c ); + res = _PyPegen_seq_append_to_end ( p , CHECK ( _PyPegen_seq_append_to_end ( p , a , b ) ) , c ); if (res == NULL && PyErr_Occurred()) { p->error_indicator = 1; return NULL; |