# File lib/ruby_lsp/response_builders/semantic_highlighting.rb, line 167defencode(tokens)
sorted_tokens = tokens.sort_by.with_indexdo|token, index|# Enumerable#sort_by is not deterministic when the compared values are equal.# When that happens, we need to use the index as a tie breaker to ensure# that the order of the tokens is always the same.
[token.start_line, token.start_code_unit_column, index]
enddelta = sorted_tokens.flat_mapdo|token|compute_delta(token)
endInterface::SemanticTokens.new(data:delta)
end
encode_modifiers(modifiers)
# File lib/ruby_lsp/response_builders/semantic_highlighting.rb, line 214defencode_modifiers(modifiers)
modifiers.inject(0) do|encoded_modifiers, modifier|encoded_modifiers| (1<<modifier)
endend