MCPcopy Create free account
hub / github.com/SpartanJ/eepp / parseCodeLens

Function parseCodeLens

src/tools/ecode/plugins/lsp/lspclientserver.cpp:737–757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735}
736
737static std::vector<LSPCodeLens> parseCodeLens( const json& result ) {
738 if ( result.empty() || !result.is_array() )
739 return {};
740
741 std::vector<LSPCodeLens> codeLens;
742
743 for ( const auto& codeLen : result ) {
744 if ( !codeLen.contains( "range" ) )
745 continue;
746 LSPCodeLens cl;
747 cl.range = parseRange( codeLen["range"] );
748 if ( codeLen.contains( "command" ) )
749 cl.command = parseCommand( codeLen["command"] );
750 if ( codeLen.contains( "data" ) )
751 cl.data = codeLen["data"];
752
753 codeLens.emplace_back( cl );
754 }
755
756 return codeLens;
757}
758
759static json codeActionParams( const URI& document, const TextRange& range,
760 const std::vector<std::string>& kinds, const json& diagnostics ) {

Callers 1

documentCodeLensMethod · 0.85

Calls 4

parseRangeFunction · 0.85
parseCommandFunction · 0.70
emptyMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected