Browse Source

C# type system convert visitor: do not include attributes in IEntity.Region

newNRvisualizers
Daniel Grunwald 13 years ago
parent
commit
2926e24dcf
  1. 8
      ICSharpCode.NRefactory.CSharp/TypeSystem/TypeSystemConvertVisitor.cs

8
ICSharpCode.NRefactory.CSharp/TypeSystem/TypeSystemConvertVisitor.cs

@ -99,8 +99,12 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem @@ -99,8 +99,12 @@ namespace ICSharpCode.NRefactory.CSharp.TypeSystem
{
if (node == null || node.IsNull)
return DomRegion.Empty;
else
return MakeRegion(node.StartLocation, node.EndLocation);
AstNode child = node.FirstChild;
// Skip attributes and comments between attributes for the purpose of
// getting a declaration's region.
while (child != null && (child is AttributeSection || child.NodeType == NodeType.Whitespace))
child = child.NextSibling;
return MakeRegion((child ?? node).StartLocation, node.EndLocation);
}
DomRegion MakeBraceRegion(AstNode node)

Loading…
Cancel
Save