The Wayback Machine - https://web.archive.org/web/20230115050202/https://github.com/RustPython/RustPython/pull/4323
Skip to content
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

pattern matching parser support #4323

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

youknowone
Copy link
Member

@youknowone youknowone commented Dec 10, 2022

cherry-picked from #3427

cc @Snowapril @charliermarsh

@charliermarsh
Copy link
Contributor

This would be huge for Ruff.

@youknowone
Copy link
Member Author

ah, its parser part was not that much ready and I need to find how to add a soft-keyword concept to parser.

@pauloxnet
Copy link

I hope this can help Ruff to support pattern matching and close the issue charliermarsh/ruff#282

@charliermarsh
Copy link
Contributor

The dream...

@charliermarsh
Copy link
Contributor

Sorry to double-post, but copying over my most recent comment from the related issue in Ruff:

I'd love to sponsor someone (financially, that is) to work on this issue (in RustPython). If you're interested, shoot me a DM on Twitter or email me at [email protected] :)

@youknowone
Copy link
Member Author

To be honest, after watching @andersk's work, I thought his way would be much better than my hacky local work.
I was going to add a mode to lexer to optionally generate a match token - which is not a good idea for either design or performance.
@andersk Do you have a plan to work on it? I think you are the one who is most close to the goal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants