summaryrefslogtreecommitdiffstats
path: root/Parser/parser.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2021-04-15 23:45:42 (GMT)
committerGitHub <noreply@github.com>2021-04-15 23:45:42 (GMT)
commitb5b98bd8f8c72a9068cf149dbc162c8c95d30057 (patch)
treed5ad6222ee887077367fe44510f946463a0d89e4 /Parser/parser.c
parentb280248be8e648feb82f3f3ed0050e50b238df7b (diff)
downloadcpython-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.c2
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--);