Browse Source

Fixed destructor identifier.

newNRvisualizers
Mike Krüger 14 years ago
parent
commit
ae28762282
  1. 2
      ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs
  2. 1007
      ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs
  3. 3
      ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay
  4. 7
      ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs

2
ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs

@ -1196,7 +1196,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -1196,7 +1196,7 @@ namespace ICSharpCode.NRefactory.CSharp
AddModifiers (newDestructor, location);
if (location != null)
newDestructor.AddChild (new CSharpTokenNode (Convert (location [0])), DestructorDeclaration.TildeRole);
newDestructor.AddChild (Identifier.Create (d.MemberName.Name, Convert (d.MemberName.Location)), AstNode.Roles.Identifier);
newDestructor.AddChild (Identifier.Create (d.Identifer, Convert (d.MemberName.Location)), AstNode.Roles.Identifier);
if (location != null) {
newDestructor.AddChild (new CSharpTokenNode (Convert (location [1])), DestructorDeclaration.Roles.LPar);

1007
ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.cs

File diff suppressed because it is too large Load Diff

3
ICSharpCode.NRefactory.CSharp/Parser/mcs/cs-parser.jay

@ -2313,6 +2313,9 @@ destructor_declaration @@ -2313,6 +2313,9 @@ destructor_declaration
Destructor d = new Destructor (current_type, (Modifiers) $2,
ParametersCompiled.EmptyReadOnlyParameters, (Attributes) $1, lt.Location);
#if FULL_AST
d.Identifier = lt.Value;
#endif
if (doc_support)
d.DocComment = ConsumeStoredComment ();

7
ICSharpCode.NRefactory.CSharp/Parser/mcs/method.cs

@ -2100,6 +2100,13 @@ namespace Mono.CSharp { @@ -2100,6 +2100,13 @@ namespace Mono.CSharp {
public static readonly string MetadataName = "Finalize";
#if FULL_AST
public string Identifer {
get;
set;
}
#endif
public Destructor (TypeDefinition parent, Modifiers mod, ParametersCompiled parameters, Attributes attrs, Location l)
: base (parent, null, mod, AllowedModifiers, new MemberName (MetadataName, l), attrs, parameters)
{

Loading…
Cancel
Save