-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Refactor error handling code in Parser/pegen/pegen.c #20440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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