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

Choosing the parsing backend #9

Closed
pintariching opened this issue Aug 11, 2022 · 6 comments
Closed

Choosing the parsing backend #9

pintariching opened this issue Aug 11, 2022 · 6 comments

Comments

@pintariching
Copy link
Owner

pintariching commented Aug 11, 2022

Some options are:

nom and pest seem to be the most popular right now.
Any other suggestions? Tell me what we should use

@linrium
Copy link
Contributor

linrium commented Aug 11, 2022

I found a benchmark between chumsky and nom: zesterer/chumsky#94
And some related topics between nom and pest: https://unhandledexpression.com/general/2018/10/04/no-pest-is-not-faster-than-nom.html

@pintariching
Copy link
Owner Author

Chumsky seems well maintained and apparently very fast. I'm leaning towards it.

@qwertydelle
Copy link
Contributor

From looking into Svelte Parser HTML is parsed using its own parser while javascript an CSS are both parsed by 3rd party libraries. Rustle could use a similar approach by parsing javascript with swc_ecma_parser or another parser and CSS with another library.

@pintariching
Copy link
Owner Author

Yeah after looking into it, I think I'm going to use the swc crates for parsing the js and css and try and rewrite their html compiler

@qwertydelle
Copy link
Contributor

Does swc have a css parser?

@pintariching
Copy link
Owner Author

I looked around in the swc crates and I found it

Repository owner moved this from In Progress to Done in rustle project Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants