For my ledger-cli port I am now working on a feature that enables the user to specify a report format using a domain specific language. This is very flexible for the advanced user, who will be able to create reports tailored to specific needs. I will use it myself to automate some of my tax requirements.
Not knowing any better, I am doing this using pest, which I think is an elegant way to do it. But I was wondering, how would you go about it?
Iām doing the same (i.e. writing a DSL) and I rely on pest for that.
It makes the job without a lot of stuff.
I think pest is quite a good tool.
Nevertheless, I noticed one weakness if your DSL file could be large (more than thousands of lines): the location in the file using pest API (i.e. using start_pos from pest::Span) could be slow.