davesnx / styled-ppx

Type-safe styled components for ReScript, Melange and native with type-safe CSS
https://styled-ppx.vercel.app
BSD 2-Clause "Simplified" License
399 stars 32 forks source link

refactor code to ease maintenance #402

Closed lubegasimon closed 7 months ago

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
styled-ppx 🔄 Building (Inspect) Visit Preview 💬 Add feedback Dec 26, 2023 1:30pm
lubegasimon commented 8 months ago

Is there any part of the code that this PR tries to improve that I'm missing? Would you like to share upfront the reasons for the refactors, so I might be able to see the same as you.

Well, while unifying the lexers, I duplicated many functions. For example consume_whitespace_ from consume_whitespac, consume_url_ from consume_url. This PR eliminates such duplication and it is a subtask to integrate the get_next_token and consume functions which I find share more or less the same logic.

lubegasimon commented 7 months ago

sad, but I will rebuild it better in the future when resources are adequate.