9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_LSPCLIENT_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_LSPCLIENT_H
12#include "llvm/ADT/StringRef.h"
13#include <condition_variable>
14#include <llvm/Support/Error.h>
15#include <llvm/Support/JSON.h>
30 std::unique_ptr<TransportImpl> T;
39 llvm::Expected<llvm::json::Value>
take();
45 void set(llvm::Expected<llvm::json::Value> V);
47 std::optional<llvm::Expected<llvm::json::Value>> Value;
49 std::condition_variable CV;
66 void notify(llvm::StringRef
Method, llvm::json::Value Params);
75 static llvm::json::Value
uri(llvm::StringRef
Path);
77 void didOpen(llvm::StringRef
Path, llvm::StringRef Content);
78 void didChange(llvm::StringRef
Path, llvm::StringRef Content);
83 std::optional<std::vector<llvm::json::Value>>
llvm::Expected< llvm::json::Value > take()
llvm::json::Value takeValue()
CallResult & call(llvm::StringRef Method, llvm::json::Value Params)
LSPClient(LSPClient &&)=delete
LSPClient & operator=(LSPClient &&)=delete
std::vector< llvm::json::Value > takeNotifications(llvm::StringRef Method)
static llvm::json::Value uri(llvm::StringRef Path)
std::vector< llvm::json::Value > takeCallParams(llvm::StringRef Method)
static llvm::json::Value documentID(llvm::StringRef Path)
void didClose(llvm::StringRef Path)
void notify(llvm::StringRef Method, llvm::json::Value Params)
void expectServerCall(llvm::StringRef Method)
void didOpen(llvm::StringRef Path, llvm::StringRef Content)
void didChange(llvm::StringRef Path, llvm::StringRef Content)
std::optional< std::vector< llvm::json::Value > > diagnostics(llvm::StringRef Path)
std::string Path
A typedef to represent a file path.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//