I've been using a 'golden tests' library for testing my parser, and it's just delightful. Rather than writing a verbose assertion about the resulting AST, I can just re-run my tests until the output looks good!
I'm using https://github.com/jfecher/golden-tests currently, which can automatically update the output in the file.
Example commit:
miniblog.
Related Posts
I'm still not sure whether a language should include a "kitchen sink linter" like Rust's clippy or have a package oriented "thousand flowers bloom" linter like eslint for JS and TS.
Clippy is delightful out of the box but eslint makes it so easy to have project specific lints.
Some delightful examples of good compiler error messages in the latest Gleam release:
I've been using a 'golden tests' library for testing my parser, and it's just delightful. Rather than writing a verbose assertion about the resulting AST, I can just re-run my tests until the output looks good!