This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(formatter): Change binary like expression to format left to …
…right (#2640) Refactors the binary like expression formatting to lazily write the expressions rather than allocating vectors with the sub results. The basic idea remains the same. The implementation flattens an expression. What's different to before is that this is now a two-stage process: 1. Flatten the binary expression and specify for each "part" how it should be formatted (left, right, or a group) 2. Format the flattened expressions I think this also improves readability because it makes it clear what concepts exist in this algorithm (left hand side, right hand side, and a sub-group).
- Loading branch information