Skip to main content

Module optimizing

Module optimizing 

Source
Expand description

Optimization for format descriptions.

The tree of all items is walked recursively and optimized in-place. All passes are called in a loop until the tree remains unchanged after executing all passes, meaning that it is fully optimized.

Each optimization function accepts self mutably and returns whether it modified the tree. Note that optimizations must not affect runtime behavior in terms of formatting output, accepted input when parsing, or output from the parser.