Show HN: Zig parser in ~70 lines of JavaScript
github.comI wanted something lighter than zig autodoc so I've implemented (and golfed a bit) a custom parser using parser combinators in JS. It's not 100% correct and it's also not meant to be, all I care about is if it can parse my own Zig code, not any valid Zig code.
There are also some bugs, and I don't intend to support, nor develop this much further, consider it vaporware which you are free to fork and use it for something, or just have some fun reading the code and figuring out how it works (I certainly had a lot of fun implementing it - no LLMs, so it was a nice exercise too).
BTW: I know it's probably very inefficient, and I don't care - it goes through 67 files in 0.19s and I don't expect it to be ever a bottleneck for this use-case, so I've spent exactly 0 minutes trying to optimize it.
No comments yet.