public static void AddChangesToBounds( PreprocessedTextLocationMap map, List <PreprocessingTextChange> changes, PreprocessedData data, PreprocessedTextType type) { if (data == null) { return; } foreach (var change in changes) { if (change.RemoveCharsCount == 0) { continue; } var start = change.Index; var end = change.Index + change.RemoveCharsCount - 1; if (map != null) { start = map.GetOriginalPosition(start, PositionRounding.Up); end = map.GetOriginalPosition(end, PositionRounding.Down); } data.PreprocessedTextBounds.Add( new PreprocessedTextBound( type, start, end)); } }
public static void AddChangesToBounds( PreprocessedTextLocationMap map, List<PreprocessingTextChange> changes, PreprocessedData data, PreprocessedTextType type) { if (data == null) { return; } foreach (var change in changes) { if (change.RemoveCharsCount == 0) { continue; } var start = change.Index; var end = change.Index + change.RemoveCharsCount - 1; if(map != null) { start = map.GetOriginalPosition(start, PositionRounding.Up); end = map.GetOriginalPosition(end, PositionRounding.Down); } data.PreprocessedTextBounds.Add( new PreprocessedTextBound( type, start, end)); } }
public PreprocessedTextBound(PreprocessedTextType type, int start, int end) { Interval bound; bound.Start = start; bound.End = end; Bound = bound; Type = type; }
string GetClassificationStringForPreprocessedText(PreprocessedTextType type) { switch (type) { case PreprocessedTextType.Comment: return "markdown.htmlcomment"; case PreprocessedTextType.FilteredOut: return null; case PreprocessedTextType.Metadata: return "markdown.metadata"; case PreprocessedTextType.Reference: return "markdown.url.definition"; default: return null; } }
string GetClassificationStringForPreprocessedText(PreprocessedTextType type) { switch (type) { case PreprocessedTextType.Comment: return("markdown.htmlcomment"); case PreprocessedTextType.FilteredOut: return(null); case PreprocessedTextType.Metadata: return("markdown.metadata"); case PreprocessedTextType.Reference: return("markdown.url.definition"); default: return(null); } }
public PreprocessedTextBound(PreprocessedTextType type, Interval bound) { Bound = bound; Type = type; }