Compiler Crates
7 points by BD103
7 points by BD103
Was a bunch of this written by an LLM? It feels perhaps too even-keeled, without any kind of concrete opinions on pros and cons of different things, and does not have any examples of pain points hit.
E.g. with Miette, a few years back, I recall running into headaches with lifetime issues because of the definition of the core Diagnostic trait.
While I think the data structures and codegen side of things are interesting, I'd probably recommend "just" writing hand-written recursive descent parser Pratt and using something Rowan-shaped for syntax trees. Heck, you can probably get an LLM to work on it in the background; it's basically the perfect code for it.
Parsing isnt the hard part of a compiler tho, especially if one defines the language to parse.
While this list seems nice, for me part of the fun of writing a compiler or interpreter is handrolling and thus dealing with the hard problems. I love clap for the cli tho