dart-lang / dart_style

An opinionated formatter/linter for Dart code
https://pub.dev/packages/dart_style
BSD 3-Clause "New" or "Revised" License
645 stars 117 forks source link

Remove some unnecessary Piece classes. #1491

Closed munificent closed 3 months ago

munificent commented 3 months ago

In exploring various optimizations, it's clear that I'll probably need to make some changes to how all of the Piece classes work. The more of those classes there are, the harder that work is.

Fortunately, there are a few Piece classes that don't really need to exist. Most were created before we had AdjacentPiece or the ability to insert spaces between pieces.

Each commit in this PR removes a Piece class or otherwise simplifies them.