Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
refactor(formatter): Change binary like expression to format left to …
Browse files Browse the repository at this point in the history
…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
MichaReiser authored Jun 7, 2022
1 parent 0b6f256 commit 8c3a819
Showing 1 changed file with 257 additions and 211 deletions.
Loading

0 comments on commit 8c3a819

Please sign in to comment.