Browse Source

Improve spacing in fixed statement output.

newNRvisualizers
Daniel Grunwald 15 years ago
parent
commit
f68a49b509
  1. 2
      ICSharpCode.NRefactory/CSharp/Ast/ComposedType.cs
  2. 4
      ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

2
ICSharpCode.NRefactory/CSharp/Ast/ComposedType.cs

@ -55,6 +55,8 @@ namespace ICSharpCode.NRefactory.CSharp @@ -55,6 +55,8 @@ namespace ICSharpCode.NRefactory.CSharp
return GetChildrenByRole(PointerRole).Count();
}
set {
if (value < 0)
throw new ArgumentOutOfRangeException();
int d = this.PointerRank;
while (d > value) {
GetChildByRole(PointerRole).Remove();

4
ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

@ -1387,9 +1387,13 @@ namespace ICSharpCode.NRefactory.CSharp @@ -1387,9 +1387,13 @@ namespace ICSharpCode.NRefactory.CSharp
{
StartNode(fixedStatement);
WriteKeyword("fixed");
Space(policy.UsingParentheses);
LPar();
Space(policy.WithinUsingParentheses);
fixedStatement.Type.AcceptVisitor(this, data);
Space();
WriteCommaSeparatedList(fixedStatement.Variables);
Space(policy.WithinUsingParentheses);
RPar();
WriteEmbeddedStatement(fixedStatement.EmbeddedStatement);
return EndNode(fixedStatement);

Loading…
Cancel
Save