Update list formatting to force breaks on commmas and preserve trailing commas
GITHUB_BREAKING_CHANGES=n/a
@@ -4400,7 +4400,12 @@ private ExprNode ListLiteral(Token begin, ExprNode firstItem) :
commaLocations.add(createSrcLoc(comma).getBeginPoint());
}
)*
- [ <COMMA> ] // trailing comma
+ [
+ comma = <COMMA>
+ {
+ commaLocations.add(createSrcLoc(comma).getBeginPoint());
+ }
+ ]
end = <RBRACKET>
{ return new ListLiteralNode(items, createSrcLoc(begin, end), commaLocations); }
)
