◐ Shell
clean mode source ↗

bpo-40334: Produce better error messages on invalid targets by lysnikolaou · Pull Request #20106 · python/cpython

The following error messages get produced:
- `cannot delete ...` for invalid `del` targets
- `... is an illegal 'for' target` for invalid targets in for
  statements
- `... is an illegal 'with' target` for invalid targets in
  with statements

Additionally a few `cut`s were added in various places before the
invocation of the `invalid_*` rule, in order to speed things
up.

pablogsal

@lysnikolaou

@lysnikolaou

pablogsal

pablogsal

pablogsal

gvanrossum

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Correctly identify invalid targets, when there are multiple context
managers in a with statement, avoid SEGFAULT in invalid for targets
and improve paremeter naming in _PyPegen_get_invalid_target.

@lysnikolaou

pablogsal

gvanrossum

…PyPegen_get_invalid_target

@lysnikolaou

@lysnikolaou

pablogsal

pablogsal

@lysnikolaou

lysnikolaou added a commit to lysnikolaou/cpython that referenced this pull request

Jun 18, 2020
…-20106)

The following error messages get produced:
- `cannot delete ...` for invalid `del` targets
- `... is an illegal 'for' target` for invalid targets in for
  statements
- `... is an illegal 'with' target` for invalid targets in
  with statements

Additionally, a few `cut`s were added in various places before the
invocation of the `invalid_*` rule, in order to speed things
up.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 01ece63)

pablogsal added a commit that referenced this pull request

Jun 19, 2020
…-20106) (GH-20973)

* bpo-40334: Produce better error messages on invalid targets (GH-20106)

The following error messages get produced:
- `cannot delete ...` for invalid `del` targets
- `... is an illegal 'for' target` for invalid targets in for
  statements
- `... is an illegal 'with' target` for invalid targets in
  with statements

Additionally, a few `cut`s were added in various places before the
invocation of the `invalid_*` rule, in order to speed things
up.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 01ece63)

fasih pushed a commit to fasih/cpython that referenced this pull request

Jun 29, 2020
…-20106)

The following error messages get produced:
- `cannot delete ...` for invalid `del` targets
- `... is an illegal 'for' target` for invalid targets in for
  statements
- `... is an illegal 'with' target` for invalid targets in
  with statements

Additionally, a few `cut`s were added in various places before the
invocation of the `invalid_*` rule, in order to speed things
up.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>