csharpier
csharpier copied to clipboard
ElementAccessExpression and ArrayRankSpecifier edge cases
There are a number of edge cases in VariableDeclartions.cst and one in FixedStatements.cst that are not handled yet. This is the desired formatting.
var arrayCreationExpression1 = new byte[100];
var arrayCreationExpression2 =
new byte[SqlParameterCollectionExtensions.DefaultValueColumnWidth];
var arrayCreationExpression3 =
new byte[SqlParameterCollectionExtensions.DefaultValueColumnWidth + 100];
var shortOne______ =
new byte[SqlParameterCollectionExtensions.DefaultValueColumnWidth + 100];
var muchLongerOne_________________ = new byte[
SqlParameterCollectionExtensions.DefaultValueColumnWidth + DefaultValueColumnWidth
];
var muchLongerOne_________________ = new byte[
SqlParameterCollectionExtensions.DefaultValueColumnWidth
+ SqlParameterCollectionExtensions.DefaultValueColumnWidth
];
var elementAccessExpression1 = anArray[100];
var elementAccessExpression2 =
anArray[SqlParameterCollectionExtensions.DefaultValueColumnWidth];
var elementAccessExpression3 =
anArray[SqlParameterCollectionExtensions.DefaultValueColumnWidth + 100];
var shortOne______ =
anArray_[SqlParameterCollectionExtensions.DefaultValueColumnWidth + 100];
var shortOne______ = anArray[
SqlParameterCollectionExtensions.DefaultValueColumnWidth + DefaultValueColumnWidth
];
var shortOne______ = anArray[
SqlParameterCollectionExtensions.DefaultValueColumnWidth
+ SqlParameterCollectionExtensions.DefaultValueColumnWidth
];
// this is in FixedStatements
int* someLongNameThatWillMakeThisBreakYeahKeepGoing_____________________ =
stackalloc int[100];