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

feat: modernize parser #412

Merged
merged 11 commits into from
Jan 6, 2025
Merged

Conversation

vidhanio
Copy link
Contributor

@vidhanio vidhanio commented Jan 7, 2024

parser rewritten from the ground-up using syn idioms and more strongly-typed syn structures rather than TokenStreams. passes all test cases flawlessly, and makes the code much easier to understand.

also drops proc-macro-error for a more robust solution (proc-macro2-diagnostics) which doesn't need global state and macros.

all of the edited trybuild test-cases are either adding more information/cases or fixing some bugs.

@lambda-fairy
Copy link
Owner

Thanks @vidhanio!

I remember playing with the syn parser and getting stuck on diagnostics. So I'm glad that you found a solution for that.

I'm really busy at the moment so apologies for the delay. I'll try to have a look some time this weekend.

@vidhanio
Copy link
Contributor Author

vidhanio commented Feb 21, 2024

Thanks @vidhanio!

I remember playing with the syn parser and getting stuck on diagnostics. So I'm glad that you found a solution for that.

I'm really busy at the moment so apologies for the delay. I'll try to have a look some time this weekend.

no problem!

i've since changed it a bit and repackaged it into my own library, hypertext. I could port the changes backwards to this if needed! 😁

@yonas
Copy link

yonas commented Oct 6, 2024

Is this ready for merge?

@lambda-fairy
Copy link
Owner

There's some edge cases around integer literals that I haven't sorted out yet. Let me take a look.

@lambda-fairy lambda-fairy enabled auto-merge (squash) January 6, 2025 05:25
@lambda-fairy lambda-fairy merged commit 31d3792 into lambda-fairy:main Jan 6, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants