Example #1
0
 /// <summary>
 /// Adds a <see cref="SpanReference"/>
 /// </summary>
 /// <param name="output">Output</param>
 /// <param name="reference">Reference</param>
 /// <param name="start">Start position</param>
 /// <param name="end">End position</param>
 /// <param name="id">Reference id or null, eg. <see cref="PredefinedSpanReferenceIds.HighlightRelatedKeywords"/></param>
 public static void AddSpanReference(this IDecompilerOutput output, object reference, int start, int end, string id) =>
 output.AddCustomData(PredefinedCustomDataIds.SpanReference, new SpanReference(reference, TextSpan.FromBounds(start, end), id));
Example #2
0
 /// <summary>
 /// Adds a <see cref="CodeBracesRange"/>
 /// </summary>
 /// <param name="output">Output</param>
 /// <param name="start">Start span</param>
 /// <param name="end">End span</param>
 /// <param name="flags">Flags</param>
 public static void AddBracePair(this IDecompilerOutput output, TextSpan start, TextSpan end, CodeBracesRangeFlags flags) =>
 output.AddCustomData(PredefinedCustomDataIds.CodeBracesRange, new CodeBracesRange(start, end, flags));
Example #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="binSpan">Binary span</param>
 /// <param name="textSpan">Text span</param>
 public SourceStatement(BinSpan binSpan, TextSpan textSpan)
 {
     this.binSpan  = binSpan;
     this.textSpan = textSpan;
 }