mofmt 0.4.0
[0.4.0] - 2024-02-05
This release marks an important milestone. From now on mofmt
will be
implemented in Rust. The migration was motivated by very poor
performance of Python implementation. This was caused partially by the
ANTLR parser having a general runtime that couldn't be tailored in any
way, and mainly because of the inherent slowness of Python.
New Rust implementation was around 50x faster. After including better
and more detailed heuristics it is still between 30-40x faster without
any performance tweaks. This both creates significant performance
savings that can be spent in the future on more advanced features like
HTML formatting, and opens possibilities of performance gains through
multithreading etc.
Few long existing bugs were fixed along the way. There are some minor
changes in the style applied by mofmt
. Refer to the code-style.md
.
Added
- support for new syntactical constructs from Modelica 3.7
- cover output-expression-list production
Changed
- expressions are now wrapped at every operator inside the precedence
level where the original wrap occurred as well as in all outer levels
Fixed
- enum lists and argument lists are now wrapped if they contain
descriptions without the need to run formatter twice