-
Notifications
You must be signed in to change notification settings - Fork 157
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
Conversation
Thanks @vidhanio! I remember playing with the 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! 😁 |
478f386
to
6bbc502
Compare
Is this ready for merge? |
6bbc502
to
90bb109
Compare
There's some edge cases around integer literals that I haven't sorted out yet. Let me take a look. |
parser rewritten from the ground-up using
syn
idioms and more strongly-typedsyn
structures rather thanTokenStream
s. 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.