MLIR
18.0.0git
|
#include "mlir/Tools/lsp-server-support/Protocol.h"
#include "mlir/Support/LogicalResult.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 168 of file Protocol.cpp.
References isWindowsPath().
Referenced by parseFilePathFromURI().
|
static |
Return the set containing the supported URI schemes.
Definition at line 121 of file Protocol.cpp.
Referenced by parseFilePathFromURI(), and mlir::lsp::URIForFile::registerSupportedScheme().
|
static |
Definition at line 60 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 129 of file Protocol.cpp.
Referenced by parseFilePathFromURI().
|
static |
Definition at line 56 of file Protocol.cpp.
Referenced by getAbsolutePath(), and uriFromAbsolutePath().
|
static |
Definition at line 33 of file Protocol.cpp.
References mlir::lsp::fromJSON().
Referenced by mlir::lsp::fromJSON().
|
static |
Definition at line 189 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 102 of file Protocol.cpp.
Referenced by parseFilePathFromURI().
|
static |
Encodes a string according to percent-encoding.
Definition at line 89 of file Protocol.cpp.
References shouldEscapeInURI().
Referenced by uriFromAbsolutePath().
|
static |
Definition at line 65 of file Protocol.cpp.
Referenced by percentEncode().
|
static |
Definition at line 564 of file Protocol.cpp.
Referenced by mlir::lsp::toJSON().
|
static |
Definition at line 139 of file Protocol.cpp.
References isNetworkPath(), isWindowsPath(), and percentEncode().
Referenced by mlir::lsp::URIForFile::fromFile().