MLIR
20.0.0git
|
#include "mlir/Tools/lsp-server-support/Protocol.h"
#include "mlir/Tools/lsp-server-support/Logging.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Functions | |
template<typename T > | |
static bool | mapOptOrNull (const llvm::json::Value ¶ms, llvm::StringLiteral prop, T &out, llvm::json::Path path) |
static bool | isWindowsPath (StringRef path) |
static bool | isNetworkPath (StringRef path) |
static bool | shouldEscapeInURI (unsigned char c) |
static void | percentEncode (StringRef content, std::string &out) |
Encodes a string according to percent-encoding. More... | |
static std::string | percentDecode (StringRef content) |
Decodes a string according to percent-encoding. More... | |
static StringSet & | getSupportedSchemes () |
Return the set containing the supported URI schemes. More... | |
static bool | isStructurallyValidScheme (StringRef scheme) |
Returns true if the given scheme is structurally valid, i.e. More... | |
static llvm::Expected< std::string > | uriFromAbsolutePath (StringRef absolutePath, StringRef scheme) |
static llvm::Expected< std::string > | getAbsolutePath (StringRef authority, StringRef body) |
static llvm::Expected< std::string > | parseFilePathFromURI (StringRef origUri) |
static llvm::StringRef | toTextKind (MarkupKind kind) |
|
static |
Definition at line 167 of file Protocol.cpp.
References isWindowsPath().
Referenced by parseFilePathFromURI().
|
static |
Return the set containing the supported URI schemes.
Definition at line 120 of file Protocol.cpp.
Referenced by parseFilePathFromURI(), and mlir::lsp::URIForFile::registerSupportedScheme().
|
static |
Definition at line 59 of file Protocol.cpp.
Referenced by uriFromAbsolutePath().
|
static |
Returns true if the given scheme is structurally valid, i.e.
it does not contain any invalid scheme characters. This does not check that the scheme is actually supported.
Definition at line 128 of file Protocol.cpp.
Referenced by parseFilePathFromURI().
|
static |
Definition at line 55 of file Protocol.cpp.
Referenced by getAbsolutePath(), and uriFromAbsolutePath().
|
static |
Definition at line 32 of file Protocol.cpp.
References mlir::lsp::fromJSON().
Referenced by mlir::lsp::fromJSON().
|
static |
Definition at line 188 of file Protocol.cpp.
References mlir::lsp::contains(), getAbsolutePath(), getSupportedSchemes(), isStructurallyValidScheme(), and percentDecode().
Referenced by mlir::lsp::URIForFile::fromURI().
|
static |
Decodes a string according to percent-encoding.
Definition at line 101 of file Protocol.cpp.
Referenced by parseFilePathFromURI().
|
static |
Encodes a string according to percent-encoding.
Definition at line 88 of file Protocol.cpp.
References shouldEscapeInURI().
Referenced by uriFromAbsolutePath().
|
static |
Definition at line 64 of file Protocol.cpp.
Referenced by percentEncode().
|
static |
Definition at line 563 of file Protocol.cpp.
References mlir::lsp::Markdown, and mlir::lsp::PlainText.
Referenced by mlir::lsp::operator<<(), and mlir::lsp::toJSON().
|
static |
Definition at line 138 of file Protocol.cpp.
References isNetworkPath(), isWindowsPath(), and percentEncode().
Referenced by mlir::lsp::URIForFile::fromFile().