예제 #1
0
        public static SemanticTokensFullOrDelta ComputeSemanticTokensEdits(
            SemanticTokens newTokens,
            IReadOnlyList <int> previousResults)
        {
            var differ = new SemanticTokensEditsDiffer(previousResults, newTokens.Data);
            var diffs  = differ.ComputeDiff();
            var edits  = differ.ProcessEdits(diffs);
            var result = new SemanticTokensDelta
            {
                ResultId = newTokens.ResultId,
                Edits    = edits,
            };

            return(result);
        }
예제 #2
0
        public static SemanticTokensOrSemanticTokensEdits ComputeSemanticTokensEdits(
            SemanticTokens newTokens,
            IReadOnlyList <uint> previousResults)
        {
            var differ = new SemanticTokensEditsDiffer(previousResults.ToArray(), newTokens.Data);
            var diffs  = differ.ComputeDiff();
            var edits  = differ.ProcessEdits(diffs);
            var result = new SemanticTokensEditCollection
            {
                ResultId = newTokens.ResultId,
                Edits    = edits,
            };

            return(result);
        }