Visit the same formatToken at most MaxVisitsPerToken times.
Visit the same formatToken at most MaxVisitsPerToken times.
If the same token is
Whether to listen to optimalAt fields in Splits.
When entering a new statement, clear out search queue.
Do not optimize inside certain areas such as term apply.
Use heuristics to escape when the search state grows out of bounds.
Use heuristics to escape when the search state grows out of bounds.
An optimization that trades off optimal formatting output in order to complete in a reasonable time. Used as a last resort.
Eliminate solutions that move slower than other solutions.
Eliminate solutions that move slower than other solutions.
If a solution reaches a point X first and other solution that reaches the same point later, the first solution is preferred if it can be verified to be always better (see State.alwaysBetter()).
Note. This affects the output positively because it breaks a tie between two equally expensive solutions by eliminating the slower one.
Example, solution 1 is preferred even though both solutions cost the same:
// solution 1 a + b + c + d // solution 2 a + b + c + d
Recursively format { ...
Recursively format { ... } blocks inside no optimization zones.
By starting a new search queue, we can perform aggressive optimizations inside optimizations zones.
Runs best first search to find lowest penalty split.
Returns true if it's OK to skip over state.
Implements best first search to find optimal formatting.