Browse Source

Merge pull request #69 from erik-kallen/AttributeFix

Add attributes also to the "Attribute.Attrs" member, not only to Sections
newNRvisualizers
Mike Krüger 14 years ago
parent
commit
2e6d06b109
  1. 9
      ICSharpCode.NRefactory.CSharp/Parser/mcs/attribute.cs

9
ICSharpCode.NRefactory.CSharp/Parser/mcs/attribute.cs

@ -1133,13 +1133,15 @@ namespace Mono.CSharp {
Attrs.Add (a); Attrs.Add (a);
#if FULL_AST #if FULL_AST
Sections.Add (Attrs); var s = new List<Attribute>();
s.Add(a);
Sections.Add (s);
#endif #endif
} }
public Attributes (List<Attribute> attrs) public Attributes (List<Attribute> attrs)
{ {
Attrs = attrs; Attrs = new List<Attribute>(attrs);
#if FULL_AST #if FULL_AST
Sections.Add (attrs); Sections.Add (attrs);
#endif #endif
@ -1154,9 +1156,8 @@ namespace Mono.CSharp {
{ {
#if FULL_AST #if FULL_AST
Sections.Add (attrs); Sections.Add (attrs);
#else
Attrs.AddRange (attrs);
#endif #endif
Attrs.AddRange (attrs);
} }
public void AttachTo (Attributable attributable, IMemberContext context) public void AttachTo (Attributable attributable, IMemberContext context)

Loading…
Cancel
Save