|
|
|
@ -142,13 +142,14 @@ namespace ICSharpCode.NRefactory.PrettyPrinter |
|
|
|
{ |
|
|
|
{ |
|
|
|
for (int i = startRankIndex; i < rankSpecifier.Length; ++i) { |
|
|
|
for (int i = startRankIndex; i < rankSpecifier.Length; ++i) { |
|
|
|
outputFormatter.PrintToken(Tokens.OpenSquareBracket); |
|
|
|
outputFormatter.PrintToken(Tokens.OpenSquareBracket); |
|
|
|
if (this.prettyPrintOptions.SpacesWithinBrackets) { |
|
|
|
bool outputSpace = this.prettyPrintOptions.SpacesWithinBrackets && rankSpecifier[i] > 0; |
|
|
|
|
|
|
|
if (outputSpace) { |
|
|
|
outputFormatter.Space(); |
|
|
|
outputFormatter.Space(); |
|
|
|
} |
|
|
|
} |
|
|
|
for (int j = 0; j < rankSpecifier[i]; ++j) { |
|
|
|
for (int j = 0; j < rankSpecifier[i]; ++j) { |
|
|
|
outputFormatter.PrintToken(Tokens.Comma); |
|
|
|
outputFormatter.PrintToken(Tokens.Comma); |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.prettyPrintOptions.SpacesWithinBrackets) { |
|
|
|
if (outputSpace) { |
|
|
|
outputFormatter.Space(); |
|
|
|
outputFormatter.Space(); |
|
|
|
} |
|
|
|
} |
|
|
|
outputFormatter.PrintToken(Tokens.CloseSquareBracket); |
|
|
|
outputFormatter.PrintToken(Tokens.CloseSquareBracket); |
|
|
|
@ -2680,14 +2681,15 @@ namespace ICSharpCode.NRefactory.PrettyPrinter |
|
|
|
|
|
|
|
|
|
|
|
if (arrayCreateExpression.Arguments.Count > 0) { |
|
|
|
if (arrayCreateExpression.Arguments.Count > 0) { |
|
|
|
outputFormatter.PrintToken(Tokens.OpenSquareBracket); |
|
|
|
outputFormatter.PrintToken(Tokens.OpenSquareBracket); |
|
|
|
if (this.prettyPrintOptions.SpacesWithinBrackets) { |
|
|
|
bool outputSpace = this.prettyPrintOptions.SpacesWithinBrackets && arrayCreateExpression.Arguments.Count > 0; |
|
|
|
|
|
|
|
if (outputSpace) { |
|
|
|
outputFormatter.Space(); |
|
|
|
outputFormatter.Space(); |
|
|
|
} |
|
|
|
} |
|
|
|
for (int i = 0; i < arrayCreateExpression.Arguments.Count; ++i) { |
|
|
|
for (int i = 0; i < arrayCreateExpression.Arguments.Count; ++i) { |
|
|
|
if (i > 0) PrintFormattedComma(); |
|
|
|
if (i > 0) PrintFormattedComma(); |
|
|
|
TrackVisit(arrayCreateExpression.Arguments[i], data); |
|
|
|
TrackVisit(arrayCreateExpression.Arguments[i], data); |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.prettyPrintOptions.SpacesWithinBrackets) { |
|
|
|
if (outputSpace) { |
|
|
|
outputFormatter.Space(); |
|
|
|
outputFormatter.Space(); |
|
|
|
} |
|
|
|
} |
|
|
|
outputFormatter.PrintToken(Tokens.CloseSquareBracket); |
|
|
|
outputFormatter.PrintToken(Tokens.CloseSquareBracket); |
|
|
|
|