bpo-40334: Reproduce error message for type comments on bare '*' in the new parser (GH-20151)

This commit is contained in:
Lysandros Nikolaou 2020-05-18 22:14:47 +03:00 committed by GitHub
parent d71a6492db
commit 75b863aa97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 55 additions and 23 deletions

View file

@ -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: