Refactor error handling code in Parser/pegen/pegen.c#20440
Refactor error handling code in Parser/pegen/pegen.c#20440miss-islington merged 3 commits intopython:masterfrom
Conversation
Set p->error_indicator in various places, where it's needed, but it's not done. Also refactor `_PyPegen_expect_soft_keyword` to avoid a double call of `PyBytes_AsString` and a double check for the `NAME` type.
|
This is going to be tricky to backport to 3.9 unless we backport soft keywords too (which I am fine with TBH). Thoughts? |
|
@lysnikolaou: Status check is done, and it's a success ✅ . |
Certainly fine by me as well. Shouldn't we ask Łukasz first though, since soft keyword support is really on the edge of being a new feature for the parser? |
|
It's a new feature for pegen, not for CPython. So I think it's fine as long as we don't start using soft keywords. (Adding a Note that there are two PRs you need to backport -- my original PR, and Pablo's PR to fix lookaheads. |
|
Ok, I'm on it. |
Set p->error_indicator in various places, where it's needed, but it's
not done.
Automerge-Triggered-By: @gvanrossum