Consolidate record expression layouter #184

Merged
eborden merged 1 commits from consolidate-record-expression-layouter into master 2018-09-17 23:40:48 +02:00
eborden commented 2018-09-16 21:55:35 +02:00 (Migrated from github.com)

Both record construction and update layouting have very similar
constructions. These each had their own layouter with slightly different
variations. Variations here lead to subtly different bugs in layout for
nearly identical syntactic forms.

The record update logic is more advanced and respects IndentPolicyLeft.
Instead of keeping these layouters distinct we can consolidate
construction logic into the update logic. This results in a smaller
volume of code and more uniform layouting of syntax for these similar
forms.

Record constructors with fields and wildcards are not included in this
consolidation. A TODO has been left to handle this consolidation later.

This fixes https://github.com/lspitzner/brittany/issues/176

Both record construction and update layouting have very similar constructions. These each had their own layouter with slightly different variations. Variations here lead to subtly different bugs in layout for nearly identical syntactic forms. The record update logic is more advanced and respects `IndentPolicyLeft`. Instead of keeping these layouters distinct we can consolidate construction logic into the update logic. This results in a smaller volume of code and more uniform layouting of syntax for these similar forms. Record constructors with fields and wildcards are not included in this consolidation. A `TODO` has been left to handle this consolidation later. This fixes https://github.com/lspitzner/brittany/issues/176
lspitzner commented 2018-09-17 23:40:55 +02:00 (Migrated from github.com)

thanks!

thanks!
Sign in to join this conversation.
There is no content yet.