#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_LSPBINDER_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_LSPBINDER_H
#include "Protocol.h"
#include "support/Function.h"
#include "support/Logger.h"
#include "llvm/ADT/FunctionExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/JSON.h"
namespace clang {
namespace clangd {
class LSPBinder { … };
template <typename T>
llvm::Expected<T> LSPBinder::parse(const llvm::json::Value &Raw,
llvm::StringRef PayloadName,
llvm::StringRef PayloadKind) { … }
template <typename Param, typename Result, typename ThisT>
void LSPBinder::method(llvm::StringLiteral Method, ThisT *This,
void (ThisT::*Handler)(const Param &,
Callback<Result>)) { … }
template <typename Param, typename ThisT>
void LSPBinder::notification(llvm::StringLiteral Method, ThisT *This,
void (ThisT::*Handler)(const Param &)) { … }
template <typename Param, typename Result, typename ThisT>
void LSPBinder::command(llvm::StringLiteral Method, ThisT *This,
void (ThisT::*Handler)(const Param &,
Callback<Result>)) { … }
class LSPBinder::UntypedOutgoingNotification { … };
inline LSPBinder::UntypedOutgoingNotification
LSPBinder::outgoingNotification(llvm::StringLiteral Method) { … }
class LSPBinder::UntypedOutgoingMethod { … };
inline LSPBinder::UntypedOutgoingMethod
LSPBinder::outgoingMethod(llvm::StringLiteral Method) { … }
}
}
#endif