You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reorganize the code for selecting a block argument.
To determine which argument list in an argument list should be block
formatted, if any, we need to look at all of them. We can't do it
eagerly because the heuristics are generally of the form "If only one
argument is like X, then it is block formatted."
But before this commit, DelimitedListBuilder never saw all arguments at
once. It was given them one at a time. That meant that it had to stuff
the information needed to select a block argument (BlockFormat) into
ListPiece. This is kind of dumb because once we've selected a block
argument, that data is no longer needed, but ListPiece lives all the
way through the rest of the formatting process.
Fortunately, the only expressions that support block arguments are
argument lists, and those *do* add all of the arguments to the
DelimitedListBuilder at once. So this commit adds a method to
DelimitedListBuilder to pass them all in.
There are no behavior changes in this commit. This is just rearranging
code (and saving a bit of memory) to get ready for tweaking the
heuristics.
0 commit comments