Open EmileRolley opened 2 years ago
Additionally, this could allow automatic translation from one Catala dialect to another, e.g. French to Engish.
Indeed, except for variable names...
Update: it's still in progress, but I have a working tree-sitter parser at https://github.com/AltGr/tree-sitter-catala
and the included catala.el
file contains an emacs mode (for emacs 29+) that can do automatic indentation based on it.
The easiest way for formatting Catala at this point will be to use https://github.com/AltGr/tree-sitter-catala and https://github.com/tweag/topiary
As suggered in #252, adding a formatter to the Catala toolkit could be a great improvement for both the developer and the reviewer experience. Catala being a literate programming language, having a good readability of the code is essential.
Proposals
Format
backend using the surface AST of the compiler.