Browse Source

Improve spacing in fixed statement output.

pull/100/head
Daniel Grunwald 15 years ago
parent
commit
3c3e4ad44a
  1. 2
      NRefactory/ICSharpCode.NRefactory/CSharp/Ast/ComposedType.cs
  2. 4
      NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs

2
NRefactory/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
NRefactory/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