Browse Source

Fix build.

pull/1654/head
Siegfried Pammer 6 years ago
parent
commit
e66f4c2b45
  1. 5
      ICSharpCode.Decompiler/CSharp/OutputVisitor/ITokenWriter.cs
  2. 4
      ICSharpCode.Decompiler/Xml/TextLocation.cs
  3. 2
      ILSpy/Languages/CSharpLanguage.cs

5
ICSharpCode.Decompiler/CSharp/OutputVisitor/ITokenWriter.cs

@ -67,6 +67,11 @@ namespace ICSharpCode.Decompiler.CSharp.OutputVisitor @@ -67,6 +67,11 @@ namespace ICSharpCode.Decompiler.CSharp.OutputVisitor
var target = new TextWriterTokenWriter(writer) { IndentationString = indentation };
return new InsertSpecialsDecorator(new InsertRequiredSpacesDecorator(new InsertMissingTokensDecorator(target, target)));
}
public static TokenWriter InsertRequiredSpaces(TokenWriter writer)
{
return new InsertRequiredSpacesDecorator(writer);
}
public static TokenWriter WrapInWriterThatSetsLocationsInAST(TokenWriter writer)
{

4
ICSharpCode.Decompiler/Xml/TextLocation.cs

@ -26,10 +26,6 @@ namespace ICSharpCode.Decompiler.Xml @@ -26,10 +26,6 @@ namespace ICSharpCode.Decompiler.Xml
/// A line/column position.
/// Text editor lines/columns are counted started from one.
/// </summary>
/// <remarks>
/// The document provides the methods <see cref="Editor.IDocument.GetLocation"/> and
/// <see cref="Editor.IDocument.GetOffset(TextLocation)"/> to convert between offsets and TextLocations.
/// </remarks>
[Serializable]
[TypeConverter(typeof(TextLocationConverter))]
public struct TextLocation : IComparable<TextLocation>, IEquatable<TextLocation>

2
ILSpy/Languages/CSharpLanguage.cs

@ -633,7 +633,7 @@ namespace ICSharpCode.ILSpy @@ -633,7 +633,7 @@ namespace ICSharpCode.ILSpy
var output = new StringWriter();
var decoratedWriter = new TextWriterTokenWriter(output);
var richTextOutput = new RichTextModelOutput(decoratedWriter);
var writer = new CSharpHighlightingTokenWriter(new InsertRequiredSpacesDecorator(decoratedWriter), richTextOutput);
var writer = new CSharpHighlightingTokenWriter(TokenWriter.InsertRequiredSpaces(decoratedWriter), richTextOutput);
new CSharpAmbience() { ConversionFlags = flags }.ConvertSymbol(entity, writer, new DecompilerSettings().CSharpFormattingOptions);
return new RichText(output.ToString(), richTextOutput.Model);
}

Loading…
Cancel
Save