Browse Source

Adjust ILSpy to NRefactory API changes.

pull/348/head
Daniel Grunwald 13 years ago
parent
commit
0a01bc7b03
  1. 7
      Debugger/Debugger.Core/NRefactory/Ast/ExpressionExtensionMethods.cs
  2. 65
      ICSharpCode.Decompiler/Ast/AstBuilder.cs
  3. 9
      ICSharpCode.Decompiler/Ast/CommentStatement.cs
  4. 16
      ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs
  5. 2
      ICSharpCode.Decompiler/Ast/Transforms/ConvertConstructorCallIntoInitializer.cs
  6. 4
      ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs
  7. 2
      ICSharpCode.Decompiler/Ast/Transforms/ReplaceMethodCallsWithOperators.cs
  8. 3
      ICSharpCode.Decompiler/Tests/PropertiesAndEvents.cs
  9. 4
      ILSpy/Languages/CSharpLanguage.cs
  10. 6
      ILSpy/Properties/app.config.template
  11. 6
      ILSpy/XmlDoc/AddXmlDocTransform.cs

7
Debugger/Debugger.Core/NRefactory/Ast/ExpressionExtensionMethods.cs

@ -157,12 +157,7 @@ namespace ICSharpCode.NRefactory.Ast @@ -157,12 +157,7 @@ namespace ICSharpCode.NRefactory.Ast
{
if (code == null) return string.Empty;
using (var sw = new StringWriter())
{
CSharpOutputVisitor csOutVisitor = new CSharpOutputVisitor(sw, new CSharpFormattingOptions());
code.AcceptVisitor(csOutVisitor, null);
return sw.ToString();
}
return code.GetText(FormattingOptionsFactory.CreateSharpDevelop());
}
public static AstType GetTypeReference(this Type type)

65
ICSharpCode.Decompiler/Ast/AstBuilder.cs

@ -157,15 +157,10 @@ namespace ICSharpCode.Decompiler.Ast @@ -157,15 +157,10 @@ namespace ICSharpCode.Decompiler.Ast
if (!transformationsHaveRun)
RunTransformations();
astCompileUnit.AcceptVisitor(new InsertParenthesesVisitor { InsertParenthesesForReadability = true }, null);
astCompileUnit.AcceptVisitor(new InsertParenthesesVisitor { InsertParenthesesForReadability = true });
var outputFormatter = new TextOutputFormatter(output);
var formattingPolicy = new CSharpFormattingOptions();
// disable whitespace in front of parentheses:
formattingPolicy.SpaceBeforeMethodCallParentheses = false;
formattingPolicy.SpaceBeforeMethodDeclarationParentheses = false;
formattingPolicy.SpaceBeforeConstructorDeclarationParentheses = false;
formattingPolicy.SpaceBeforeDelegateDeclarationParentheses = false;
astCompileUnit.AcceptVisitor(new CSharpOutputVisitor(outputFormatter, formattingPolicy), null);
var formattingPolicy = FormattingOptionsFactory.CreateAllman();
astCompileUnit.AcceptVisitor(new CSharpOutputVisitor(outputFormatter, formattingPolicy));
}
public void AddAssembly(AssemblyDefinition assemblyDefinition, bool onlyAssemblyLevel = false)
@ -185,7 +180,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -185,7 +180,7 @@ namespace ICSharpCode.Decompiler.Ast
}
}
}
}, AttributedNode.AttributeRole);
}, EntityDeclaration.AttributeRole);
}
ConvertCustomAttributes(astCompileUnit, assemblyDefinition, "assembly");
@ -225,7 +220,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -225,7 +220,7 @@ namespace ICSharpCode.Decompiler.Ast
Arguments = { forwardedType }
}
}
}, AttributedNode.AttributeRole);
}, EntityDeclaration.AttributeRole);
}
}
}
@ -283,7 +278,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -283,7 +278,7 @@ namespace ICSharpCode.Decompiler.Ast
/// </summary>
/// <param name="typeDef"></param>
/// <returns>TypeDeclaration or DelegateDeclaration.</returns>
public AttributedNode CreateType(TypeDefinition typeDef)
public EntityDeclaration CreateType(TypeDefinition typeDef)
{
// create type
TypeDefinition oldCurrentType = context.CurrentType;
@ -313,7 +308,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -313,7 +308,7 @@ namespace ICSharpCode.Decompiler.Ast
astType.TypeParameters.AddRange(MakeTypeParameters(genericParameters));
astType.Constraints.AddRange(MakeConstraints(genericParameters));
AttributedNode result = astType;
EntityDeclaration result = astType;
if (typeDef.IsEnum) {
long expectedEnumMemberValue = 0;
bool forcePrintingInitializers = IsFlagsEnum(typeDef);
@ -321,7 +316,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -321,7 +316,7 @@ namespace ICSharpCode.Decompiler.Ast
if (!field.IsStatic) {
// the value__ field
if (field.FieldType != typeDef.Module.TypeSystem.Int32) {
astType.AddChild(ConvertType(field.FieldType), TypeDeclaration.BaseTypeRole);
astType.AddChild(ConvertType(field.FieldType), Roles.BaseType);
}
} else {
EnumMemberDeclaration enumMember = new EnumMemberDeclaration();
@ -332,7 +327,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -332,7 +327,7 @@ namespace ICSharpCode.Decompiler.Ast
enumMember.AddChild(new PrimitiveExpression(field.Constant), EnumMemberDeclaration.InitializerRole);
}
expectedEnumMemberValue = memberValue + 1;
astType.AddChild(enumMember, TypeDeclaration.MemberRole);
astType.AddChild(enumMember, Roles.TypeMemberRole);
}
}
} else if (typeDef.BaseType != null && typeDef.BaseType.FullName == "System.MulticastDelegate") {
@ -354,10 +349,10 @@ namespace ICSharpCode.Decompiler.Ast @@ -354,10 +349,10 @@ namespace ICSharpCode.Decompiler.Ast
} else {
// Base type
if (typeDef.BaseType != null && !typeDef.IsValueType && typeDef.BaseType.FullName != "System.Object") {
astType.AddChild(ConvertType(typeDef.BaseType), TypeDeclaration.BaseTypeRole);
astType.AddChild(ConvertType(typeDef.BaseType), Roles.BaseType);
}
foreach (var i in typeDef.Interfaces)
astType.AddChild(ConvertType(i), TypeDeclaration.BaseTypeRole);
astType.AddChild(ConvertType(i), Roles.BaseType);
AddTypeMembers(astType, typeDef);
@ -726,18 +721,18 @@ namespace ICSharpCode.Decompiler.Ast @@ -726,18 +721,18 @@ namespace ICSharpCode.Decompiler.Ast
continue;
var nestedType = CreateType(nestedTypeDef);
SetNewModifier(nestedType);
astType.AddChild(nestedType, TypeDeclaration.MemberRole);
astType.AddChild(nestedType, Roles.TypeMemberRole);
}
// Add fields
foreach(FieldDefinition fieldDef in typeDef.Fields) {
if (MemberIsHidden(fieldDef, context.Settings)) continue;
astType.AddChild(CreateField(fieldDef), TypeDeclaration.MemberRole);
astType.AddChild(CreateField(fieldDef), Roles.TypeMemberRole);
}
// Add events
foreach(EventDefinition eventDef in typeDef.Events) {
astType.AddChild(CreateEvent(eventDef), TypeDeclaration.MemberRole);
astType.AddChild(CreateEvent(eventDef), Roles.TypeMemberRole);
}
// Add properties
@ -756,7 +751,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -756,7 +751,7 @@ namespace ICSharpCode.Decompiler.Ast
}
}
AttributedNode CreateMethod(MethodDefinition methodDef)
EntityDeclaration CreateMethod(MethodDefinition methodDef)
{
MethodDeclaration astMethod = new MethodDeclaration();
astMethod.AddAnnotation(methodDef);
@ -860,7 +855,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -860,7 +855,7 @@ namespace ICSharpCode.Decompiler.Ast
astMethod.Body = CreateMethodBody(methodDef, astMethod.Parameters);
ConvertAttributes(astMethod, methodDef);
if (methodDef.IsStatic && methodDef.DeclaringType.IsBeforeFieldInit && !astMethod.Body.IsNull) {
astMethod.Body.InsertChildAfter(null, new Comment(" Note: this type is marked as 'beforefieldinit'."), AstNode.Roles.Comment);
astMethod.Body.InsertChildAfter(null, new Comment(" Note: this type is marked as 'beforefieldinit'."), Roles.Comment);
}
return astMethod;
}
@ -878,7 +873,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -878,7 +873,7 @@ namespace ICSharpCode.Decompiler.Ast
return m & ~Modifiers.Private;
}
MemberDeclaration CreateProperty(PropertyDefinition propDef)
EntityDeclaration CreateProperty(PropertyDefinition propDef)
{
PropertyDeclaration astProp = new PropertyDeclaration();
astProp.AddAnnotation(propDef);
@ -937,7 +932,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -937,7 +932,7 @@ namespace ICSharpCode.Decompiler.Ast
}
ConvertCustomAttributes(astProp, propDef);
MemberDeclaration member = astProp;
EntityDeclaration member = astProp;
if(propDef.IsIndexer())
member = ConvertPropertyToIndexer(astProp, propDef);
if(!accessor.HasOverrides && !accessor.DeclaringType.IsInterface)
@ -960,7 +955,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -960,7 +955,7 @@ namespace ICSharpCode.Decompiler.Ast
return astIndexer;
}
AttributedNode CreateEvent(EventDefinition eventDef)
EntityDeclaration CreateEvent(EventDefinition eventDef)
{
if (eventDef.AddMethod != null && eventDef.AddMethod.IsAbstract) {
// An abstract event cannot be custom
@ -1018,7 +1013,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -1018,7 +1013,7 @@ namespace ICSharpCode.Decompiler.Ast
FieldDeclaration astField = new FieldDeclaration();
astField.AddAnnotation(fieldDef);
VariableInitializer initializer = new VariableInitializer(CleanName(fieldDef.Name));
astField.AddChild(initializer, FieldDeclaration.Roles.Variable);
astField.AddChild(initializer, Roles.Variable);
astField.ReturnType = ConvertType(fieldDef.FieldType, fieldDef);
astField.Modifiers = ConvertModifiers(fieldDef);
if (fieldDef.HasConstant) {
@ -1098,7 +1093,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -1098,7 +1093,7 @@ namespace ICSharpCode.Decompiler.Ast
}
#region ConvertAttributes
void ConvertAttributes(AttributedNode attributedNode, TypeDefinition typeDefinition)
void ConvertAttributes(EntityDeclaration attributedNode, TypeDefinition typeDefinition)
{
ConvertCustomAttributes(attributedNode, typeDefinition);
ConvertSecurityAttributes(attributedNode, typeDefinition);
@ -1154,7 +1149,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -1154,7 +1149,7 @@ namespace ICSharpCode.Decompiler.Ast
#endregion
}
void ConvertAttributes(AttributedNode attributedNode, MethodDefinition methodDefinition)
void ConvertAttributes(EntityDeclaration attributedNode, MethodDefinition methodDefinition)
{
ConvertCustomAttributes(attributedNode, methodDefinition);
ConvertSecurityAttributes(attributedNode, methodDefinition);
@ -1254,7 +1249,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -1254,7 +1249,7 @@ namespace ICSharpCode.Decompiler.Ast
ConvertAttributes(attributedNode, methodDefinition.MethodReturnType, methodDefinition.Module);
}
void ConvertAttributes(AttributedNode attributedNode, MethodReturnType methodReturnType, ModuleDefinition module)
void ConvertAttributes(EntityDeclaration attributedNode, MethodReturnType methodReturnType, ModuleDefinition module)
{
ConvertCustomAttributes(attributedNode, methodReturnType, "return");
if (methodReturnType.HasMarshalInfo) {
@ -1263,7 +1258,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -1263,7 +1258,7 @@ namespace ICSharpCode.Decompiler.Ast
}
}
internal static void ConvertAttributes(AttributedNode attributedNode, FieldDefinition fieldDefinition, string attributeTarget = null)
internal static void ConvertAttributes(EntityDeclaration attributedNode, FieldDefinition fieldDefinition, string attributeTarget = null)
{
ConvertCustomAttributes(attributedNode, fieldDefinition);
@ -1402,14 +1397,14 @@ namespace ICSharpCode.Decompiler.Ast @@ -1402,14 +1397,14 @@ namespace ICSharpCode.Decompiler.Ast
var section = new AttributeSection();
section.AttributeTarget = attributeTarget;
section.Attributes.Add(attribute);
attributedNode.AddChild(section, AttributedNode.AttributeRole);
attributedNode.AddChild(section, EntityDeclaration.AttributeRole);
}
} else if (attributes.Count > 0) {
// use single section for all attributes
var section = new AttributeSection();
section.AttributeTarget = attributeTarget;
section.Attributes.AddRange(attributes);
attributedNode.AddChild(section, AttributedNode.AttributeRole);
attributedNode.AddChild(section, EntityDeclaration.AttributeRole);
}
}
}
@ -1462,14 +1457,14 @@ namespace ICSharpCode.Decompiler.Ast @@ -1462,14 +1457,14 @@ namespace ICSharpCode.Decompiler.Ast
var section = new AttributeSection();
section.AttributeTarget = attributeTarget;
section.Attributes.Add(attribute);
attributedNode.AddChild(section, AttributedNode.AttributeRole);
attributedNode.AddChild(section, EntityDeclaration.AttributeRole);
}
} else if (attributes.Count > 0) {
// use single section for all attributes
var section = new AttributeSection();
section.AttributeTarget = attributeTarget;
section.Attributes.AddRange(attributes);
attributedNode.AddChild(section, AttributedNode.AttributeRole);
attributedNode.AddChild(section, EntityDeclaration.AttributeRole);
}
}
@ -1594,7 +1589,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -1594,7 +1589,7 @@ namespace ICSharpCode.Decompiler.Ast
/// Sets new modifier if the member hides some other member from a base type.
/// </summary>
/// <param name="member">The node of the member which new modifier state should be determined.</param>
static void SetNewModifier(AttributedNode member)
static void SetNewModifier(EntityDeclaration member)
{
try {
bool addNewModifier = false;
@ -1614,7 +1609,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -1614,7 +1609,7 @@ namespace ICSharpCode.Decompiler.Ast
}
}
private static bool HidesBaseMember(AttributedNode member)
private static bool HidesBaseMember(EntityDeclaration member)
{
var memberDefinition = member.Annotation<IMemberDefinition>();
bool addNewModifier = false;

9
ICSharpCode.Decompiler/Ast/CommentStatement.cs

@ -38,6 +38,15 @@ namespace ICSharpCode.Decompiler.Ast @@ -38,6 +38,15 @@ namespace ICSharpCode.Decompiler.Ast
this.comment = comment;
}
public override void AcceptVisitor(IAstVisitor visitor)
{
}
public override T AcceptVisitor<T>(IAstVisitor<T> visitor)
{
return default(T);
}
public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)
{
return default(S);

16
ICSharpCode.Decompiler/Ast/TextOutputFormatter.cs

@ -82,7 +82,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -82,7 +82,7 @@ namespace ICSharpCode.Decompiler.Ast
{
AstNode node = nodeStack.Peek();
MemberReference memberRef = node.Annotation<MemberReference>();
if (memberRef == null && node.Role == AstNode.Roles.TargetExpression && (node.Parent is InvocationExpression || node.Parent is ObjectCreateExpression)) {
if (memberRef == null && node.Role == Roles.TargetExpression && (node.Parent is InvocationExpression || node.Parent is ObjectCreateExpression)) {
memberRef = node.Parent.Annotation<MemberReference>();
}
return memberRef;
@ -168,7 +168,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -168,7 +168,7 @@ namespace ICSharpCode.Decompiler.Ast
// Attach member reference to token only if there's no identifier in the current node.
MemberReference memberRef = GetCurrentMemberReference();
var node = nodeStack.Peek();
if (memberRef != null && node.GetChildByRole(AstNode.Roles.Identifier).IsNull)
if (memberRef != null && node.GetChildByRole(Roles.Identifier).IsNull)
output.WriteReference(token, memberRef);
else
output.Write(token);
@ -282,7 +282,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -282,7 +282,7 @@ namespace ICSharpCode.Decompiler.Ast
nodeStack.Push(node);
startLocations.Push(output.Location);
if (node is AttributedNode && node.Annotation<MemberReference>() != null && node.GetChildByRole(AstNode.Roles.Identifier).IsNull)
if (node is EntityDeclaration && node.Annotation<MemberReference>() != null && node.GetChildByRole(Roles.Identifier).IsNull)
output.WriteDefinition("", node.Annotation<MemberReference>(), false);
MemberMapping mapping = node.Annotation<MemberMapping>();
@ -330,15 +330,7 @@ namespace ICSharpCode.Decompiler.Ast @@ -330,15 +330,7 @@ namespace ICSharpCode.Decompiler.Ast
private static bool IsDefinition(AstNode node)
{
return
node is FieldDeclaration ||
node is ConstructorDeclaration ||
node is DestructorDeclaration ||
node is EventDeclaration ||
node is DelegateDeclaration ||
node is OperatorDeclaration||
node is MemberDeclaration ||
node is TypeDeclaration;
return node is EntityDeclaration;
}
}
}

2
ICSharpCode.Decompiler/Ast/Transforms/ConvertConstructorCallIntoInitializer.cs

@ -123,7 +123,7 @@ namespace ICSharpCode.Decompiler.Ast.Transforms @@ -123,7 +123,7 @@ namespace ICSharpCode.Decompiler.Ast.Transforms
if (allSame) {
foreach (var ctor in instanceCtorsNotChainingWithThis)
ctor.Body.First().Remove();
fieldOrEventDecl.GetChildrenByRole(AstNode.Roles.Variable).Single().Initializer = initializer.Detach();
fieldOrEventDecl.GetChildrenByRole(Roles.Variable).Single().Initializer = initializer.Detach();
}
} while (allSame);
}

4
ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs

@ -38,8 +38,8 @@ namespace ICSharpCode.Decompiler.Ast.Transforms @@ -38,8 +38,8 @@ namespace ICSharpCode.Decompiler.Ast.Transforms
for (AstNode child = node.FirstChild; child != null; child = child.NextSibling) {
result |= child.AcceptVisitor(this, data);
}
if (result && node is AttributedNode && !(node is Accessor)) {
((AttributedNode)node).Modifiers |= Modifiers.Unsafe;
if (result && node is EntityDeclaration && !(node is Accessor)) {
((EntityDeclaration)node).Modifiers |= Modifiers.Unsafe;
return false;
}
return result;

2
ICSharpCode.Decompiler/Ast/Transforms/ReplaceMethodCallsWithOperators.cs

@ -140,7 +140,7 @@ namespace ICSharpCode.Decompiler.Ast.Transforms @@ -140,7 +140,7 @@ namespace ICSharpCode.Decompiler.Ast.Transforms
invocationExpression.ReplaceWith(arguments[0]);
return;
}
if (methodRef.Name == "op_True" && arguments.Length == 1 && invocationExpression.Role == AstNode.Roles.Condition) {
if (methodRef.Name == "op_True" && arguments.Length == 1 && invocationExpression.Role == Roles.Condition) {
invocationExpression.ReplaceWith(arguments[0]);
return;
}

3
ICSharpCode.Decompiler/Tests/PropertiesAndEvents.cs

@ -26,8 +26,7 @@ public class PropertiesAndEvents @@ -26,8 +26,7 @@ public class PropertiesAndEvents
[field: NonSerialized]
public event EventHandler AutomaticEventWithInitializer = delegate
{
}
;
};
public event EventHandler CustomEvent
{

4
ILSpy/Languages/CSharpLanguage.cs

@ -173,7 +173,7 @@ namespace ICSharpCode.ILSpy @@ -173,7 +173,7 @@ namespace ICSharpCode.ILSpy
public void Run(AstNode compilationUnit)
{
foreach (var child in compilationUnit.Children) {
if (child is AttributedNode) {
if (child is EntityDeclaration) {
if (child.Annotation<FieldDefinition>() != field)
child.Remove();
}
@ -576,7 +576,7 @@ namespace ICSharpCode.ILSpy @@ -576,7 +576,7 @@ namespace ICSharpCode.ILSpy
((ComposedType)astType).PointerRank--;
}
astType.AcceptVisitor(new CSharpOutputVisitor(w, new CSharpFormattingOptions()), null);
astType.AcceptVisitor(new CSharpOutputVisitor(w, FormattingOptionsFactory.CreateAllman()));
return w.ToString();
}

6
ILSpy/Properties/app.config.template

@ -17,15 +17,15 @@ @@ -17,15 +17,15 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ICSharpCode.NRefactory" publicKeyToken="d4bfe873e7598c49" culture="neutral"/>
<bindingRedirect oldVersion="5.0.0.0-99.9.9.9" newVersion="5.0.0.4"/>
<bindingRedirect oldVersion="5.0.0.0-99.9.9.9" newVersion="5.0.0.6"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ICSharpCode.NRefactory.CSharp" publicKeyToken="d4bfe873e7598c49" culture="neutral"/>
<bindingRedirect oldVersion="5.0.0.0-99.9.9.9" newVersion="5.0.0.4"/>
<bindingRedirect oldVersion="5.0.0.0-99.9.9.9" newVersion="5.0.0.6"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ICSharpCode.NRefactory.VB" publicKeyToken="d4bfe873e7598c49" culture="neutral"/>
<bindingRedirect oldVersion="5.0.0.0-99.9.9.9" newVersion="5.0.0.4"/>
<bindingRedirect oldVersion="5.0.0.0-99.9.9.9" newVersion="5.0.0.6"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ICSharpCode.Decompiler" publicKeyToken="d4bfe873e7598c49" culture="neutral"/>

6
ILSpy/XmlDoc/AddXmlDocTransform.cs

@ -30,7 +30,7 @@ namespace ICSharpCode.ILSpy.XmlDoc @@ -30,7 +30,7 @@ namespace ICSharpCode.ILSpy.XmlDoc
{
public static void Run(AstNode node)
{
if (node is AttributedNode) {
if (node is EntityDeclaration) {
MemberReference mr = node.Annotation<MemberReference>();
if (mr != null && mr.Module != null) {
var xmldoc = XmlDocLoader.LoadDocumentation(mr.Module);
@ -66,12 +66,12 @@ namespace ICSharpCode.ILSpy.XmlDoc @@ -66,12 +66,12 @@ namespace ICSharpCode.ILSpy.XmlDoc
skippedWhitespaceLines++;
} else {
while (skippedWhitespaceLines > 0) {
node.Parent.InsertChildBefore(node, new Comment(string.Empty, CommentType.Documentation), AstNode.Roles.Comment);
node.Parent.InsertChildBefore(node, new Comment(string.Empty, CommentType.Documentation), Roles.Comment);
skippedWhitespaceLines--;
}
if (line.StartsWith(indentation, StringComparison.Ordinal))
line = line.Substring(indentation.Length);
node.Parent.InsertChildBefore(node, new Comment(" " + line, CommentType.Documentation), AstNode.Roles.Comment);
node.Parent.InsertChildBefore(node, new Comment(" " + line, CommentType.Documentation), Roles.Comment);
}
line = r.ReadLine();
}

Loading…
Cancel
Save