diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2021-04-15 23:45:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 23:45:42 (GMT) |
commit | b5b98bd8f8c72a9068cf149dbc162c8c95d30057 (patch) | |
tree | d5ad6222ee887077367fe44510f946463a0d89e4 /Parser/parser.c | |
parent | b280248be8e648feb82f3f3ed0050e50b238df7b (diff) | |
download | cpython-b5b98bd8f8c72a9068cf149dbc162c8c95d30057.zip cpython-b5b98bd8f8c72a9068cf149dbc162c8c95d30057.tar.gz cpython-b5b98bd8f8c72a9068cf149dbc162c8c95d30057.tar.bz2 |
bpo-43823: Fix location of one of the errors for invalid dictionary literals (GH-25427)
Diffstat (limited to 'Parser/parser.c')
-rw-r--r-- | Parser/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/parser.c b/Parser/parser.c index 2f7a71a..e47093e 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -19379,7 +19379,7 @@ invalid_kvpair_rule(Parser *p) ) { D(fprintf(stderr, "%*c+ invalid_kvpair[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression !(':')")); - _res = RAISE_SYNTAX_ERROR ( "':' expected after dictionary key" ); + _res = RAISE_ERROR_KNOWN_LOCATION ( p , PyExc_SyntaxError , a -> lineno , a -> end_col_offset - 1 , "':' expected after dictionary key" ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; D(p->level--); |