diff options
author | Lysandros Nikolaou <lisandrosnik@gmail.com> | 2020-05-18 19:14:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 19:14:47 (GMT) |
commit | 75b863aa97016c6813709eb620c43295f84dd51f (patch) | |
tree | 42e29d58a8f325cbbd43bb910837ae1cb8ca0666 /Grammar | |
parent | d71a6492dbd5434dfa6a0ad95e3ad98aa690887a (diff) | |
download | cpython-75b863aa97016c6813709eb620c43295f84dd51f.zip cpython-75b863aa97016c6813709eb620c43295f84dd51f.tar.gz cpython-75b863aa97016c6813709eb620c43295f84dd51f.tar.bz2 |
bpo-40334: Reproduce error message for type comments on bare '*' in the new parser (GH-20151)
Diffstat (limited to 'Grammar')
-rw-r--r-- | Grammar/python.gram | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram index cca9209..40e7818 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -661,6 +661,7 @@ invalid_parameters: RAISE_SYNTAX_ERROR("non-default argument follows default argument") } invalid_star_etc: | '*' (')' | ',' (')' | '**')) { RAISE_SYNTAX_ERROR("named arguments must follow bare *") } + | '*' ',' TYPE_COMMENT { RAISE_SYNTAX_ERROR("bare * has associated type comment") } invalid_lambda_star_etc: | '*' (':' | ',' (':' | '**')) { RAISE_SYNTAX_ERROR("named arguments must follow bare *") } invalid_double_type_comments: |