mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-09 22:16:10 +03:00
db34c9a848
This patch functorises the generic expression printer, in order to be able to re-use it for end-user printing. It makes it possible to have an end-user, localised printer that shares the code for e.g. priority and automatic parens handling. A generic AST rewriting that disambiguates variables (very simple to write with bindlib) is also added and used in the OCaml backend for something safer than just appending `_user` (-- this also handles clashing variables that could be introduced during compilation which would have generated wrong code before this) Finally, the `explain` plugin is adapted to use the new printer. Ah, and `String.format_t` was tweaked to correctly print strings that might contain unicode without breaking alignment, and should be used instead of `format_string` or `%s` whenever unicode can be expected. |
||
---|---|---|
.. | ||
catala_utils | ||
dcalc | ||
desugared | ||
lcalc | ||
literate | ||
plugins | ||
scalc | ||
scopelang | ||
shared_ast | ||
surface | ||
verification | ||
catala_web_interpreter.ml | ||
catala.ml | ||
driver.ml | ||
driver.mli | ||
dune | ||
index.mld | ||
plugin.ml | ||
plugin.mli | ||
tests.ml |