// Step 1908: LSPProxyServer // LSP protocol handler (JSON-RPC 2.0) that receives requests and dispatches them. // Models per-language servers as stubs — no real network required. // // t1: initialize request returns capabilities response with correct id // t2: textDocument/definition dispatches and returns a result object // t3: textDocument/hover dispatches and returns a result object // t4: unknown method returns JSON-RPC error (code -32601 method not found) // t5: notification (no id) is handled without returning a response #include "LSPProxyServer.h" #include #include #include using json = nlohmann::json; namespace ws = whetstone; static int p=0,f=0; #define T(n) { std::cout<<" "<<#n<<"... "; } #define P() { std::cout<<"PASS\n"; ++p; } #define F(m) { std::cout<<"FAIL: "< 0 ? 1 : 0; }