mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Remove trailing whitespace from python.gram (#133175)
This commit is contained in:
parent
58a0f40f1f
commit
fd0f5d0a5e
1 changed files with 5 additions and 5 deletions
|
@ -79,7 +79,7 @@ _PyPegen_parse(Parser *p)
|
|||
# ~
|
||||
# Commit to the current alternative, even if it fails to parse.
|
||||
# &&e
|
||||
# Eager parse e. The parser will not backtrack and will immediately
|
||||
# Eager parse e. The parser will not backtrack and will immediately
|
||||
# fail with SyntaxError if e cannot be parsed.
|
||||
#
|
||||
|
||||
|
@ -659,7 +659,7 @@ type_alias[stmt_ty]:
|
|||
# Type parameter declaration
|
||||
# --------------------------
|
||||
|
||||
type_params[asdl_type_param_seq*]:
|
||||
type_params[asdl_type_param_seq*]:
|
||||
| invalid_type_params
|
||||
| '[' t=type_param_seq ']' {
|
||||
CHECK_VERSION(asdl_type_param_seq *, 12, "Type parameter lists are", t) }
|
||||
|
@ -1339,13 +1339,13 @@ invalid_group:
|
|||
invalid_import:
|
||||
| a='import' ','.dotted_name+ 'from' dotted_name {
|
||||
RAISE_SYNTAX_ERROR_STARTING_FROM(a, "Did you mean to use 'from ... import ...' instead?") }
|
||||
| 'import' token=NEWLINE {
|
||||
| 'import' token=NEWLINE {
|
||||
RAISE_SYNTAX_ERROR_STARTING_FROM(token, "Expected one or more names after 'import'") }
|
||||
|
||||
invalid_import_from_targets:
|
||||
| import_from_as_names ',' NEWLINE {
|
||||
RAISE_SYNTAX_ERROR("trailing comma not allowed without surrounding parentheses") }
|
||||
| token=NEWLINE {
|
||||
| token=NEWLINE {
|
||||
RAISE_SYNTAX_ERROR_STARTING_FROM(token, "Expected one or more names after 'import'") }
|
||||
|
||||
invalid_with_stmt:
|
||||
|
@ -1484,5 +1484,5 @@ invalid_factor:
|
|||
invalid_type_params:
|
||||
| '[' token=']' {
|
||||
RAISE_SYNTAX_ERROR_STARTING_FROM(
|
||||
token,
|
||||
token,
|
||||
"Type parameter list cannot be empty")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue