MLIR
22.0.0git
|
#include "mlir/Tools/lsp-server-support/Protocol.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/ErrorHandling.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 162 of file Protocol.cpp.
References isWindowsPath().
Referenced by parseFilePathFromURI().
|
static |
Return the set containing the supported URI schemes.
Definition at line 115 of file Protocol.cpp.
Referenced by parseFilePathFromURI(), and mlir::lsp::URIForFile::registerSupportedScheme().
|
static |
Definition at line 54 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 123 of file Protocol.cpp.
Referenced by parseFilePathFromURI().
|
static |
Definition at line 50 of file Protocol.cpp.
Referenced by getAbsolutePath(), and uriFromAbsolutePath().
|
static |
Definition at line 27 of file Protocol.cpp.
References mlir::lsp::fromJSON().
Referenced by mlir::lsp::fromJSON().
|
static |
Definition at line 183 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 96 of file Protocol.cpp.
Referenced by parseFilePathFromURI().
|
static |
Encodes a string according to percent-encoding.
Definition at line 83 of file Protocol.cpp.
References shouldEscapeInURI().
Referenced by uriFromAbsolutePath().
|
static |
Definition at line 59 of file Protocol.cpp.
Referenced by percentEncode().
|
static |
Definition at line 563 of file Protocol.cpp.
References kind, mlir::lsp::Markdown, and mlir::lsp::PlainText.
Referenced by mlir::lsp::operator<<(), and mlir::lsp::toJSON().
|
static |
Definition at line 133 of file Protocol.cpp.
References isNetworkPath(), isWindowsPath(), and percentEncode().
Referenced by mlir::lsp::URIForFile::fromFile().