Browse Source

Fix folding for comments. No foldings were added for comments inside of types.

pull/897/head
Siegfried Pammer 9 years ago
parent
commit
34d288c934
  1. 4
      ICSharpCode.Decompiler/CSharp/OutputVisitor/InsertSpecialsDecorator.cs

4
ICSharpCode.Decompiler/CSharp/OutputVisitor/InsertSpecialsDecorator.cs

@ -84,7 +84,9 @@ namespace ICSharpCode.Decompiler.CSharp.OutputVisitor
for (AstNode pos = start; pos != end; pos = pos.NextSibling) { for (AstNode pos = start; pos != end; pos = pos.NextSibling) {
if (pos.Role == Roles.Comment) { if (pos.Role == Roles.Comment) {
var node = (Comment)pos; var node = (Comment)pos;
base.StartNode(node);
base.WriteComment(node.CommentType, node.Content); base.WriteComment(node.CommentType, node.Content);
base.EndNode(node);
} }
// see CSharpOutputVisitor.VisitNewLine() // see CSharpOutputVisitor.VisitNewLine()
// if (pos.Role == Roles.NewLine) { // if (pos.Role == Roles.NewLine) {
@ -94,7 +96,9 @@ namespace ICSharpCode.Decompiler.CSharp.OutputVisitor
// } // }
if (pos.Role == Roles.PreProcessorDirective) { if (pos.Role == Roles.PreProcessorDirective) {
var node = (PreProcessorDirective)pos; var node = (PreProcessorDirective)pos;
base.StartNode(node);
base.WritePreProcessorDirective(node.Type, node.Argument); base.WritePreProcessorDirective(node.Type, node.Argument);
base.EndNode(node);
} }
} }
} }

Loading…
Cancel
Save