tarides / opam-monorepo

Assemble dune workspaces to build your project and its dependencies as a whole
ISC License
130 stars 27 forks source link

Use a tokenization approach when parsing the list #311

Closed Leonidas-from-XIV closed 2 years ago

Leonidas-from-XIV commented 2 years ago

As discussed in #307 I decided to try to make it more readable by splitting the tokenization into one part and the reconstruction into strings in a separate part.

In contrast to the previous branch, this one rips out ocamllex and does the lexing manually, also reading as much as possible to avoid allocating too many objects.

To me this makes the code more understandable (especially since the list of tokens can be just inspected), but I'm happy to hear your opinion.