nixd
|
#include <Protocol.h>
Public Member Functions | |
URIForFile ()=default | |
llvm::StringRef | file () const |
Retrieves absolute path to the file. | |
operator bool () const | |
std::string | uri () const |
Static Public Member Functions | |
static URIForFile | canonicalize (llvm::StringRef AbsPath, llvm::StringRef TUPath) |
static llvm::Expected< URIForFile > | fromURI (const URI &U, llvm::StringRef HintPath) |
Friends | |
bool | operator== (const URIForFile &LHS, const URIForFile &RHS) |
bool | operator!= (const URIForFile &LHS, const URIForFile &RHS) |
bool | operator< (const URIForFile &LHS, const URIForFile &RHS) |
Definition at line 56 of file lspserver/include/lspserver/Protocol.h.
|
default |
References URIForFile().
Referenced by canonicalize(), fromURI(), operator!=, operator<, operator==, and URIForFile().
|
static |
Canonicalizes AbsPath
via URI.
File paths in URIForFile can come from index or local AST. Path from index goes through URI transformation, and the final path is resolved by URI scheme and could potentially be different from the original path. Hence, we do the same transformation for all paths.
Files can be referred to by several paths (e.g. in the presence of links). Which one we prefer may depend on where we're coming from. TUPath
is a hint, and should usually be the main entrypoint file we're processing.
Definition at line 43 of file lspserver/src/Protocol.cpp.
References lspserver::elog(), lspserver::URI::resolvePath(), and URIForFile().
|
inline |
Retrieves absolute path to the file.
Definition at line 76 of file lspserver/include/lspserver/Protocol.h.
|
static |
Definition at line 56 of file lspserver/src/Protocol.cpp.
References lspserver::URI::resolve(), and URIForFile().
Referenced by lspserver::fromJSON().
|
inlineexplicit |
Definition at line 78 of file lspserver/include/lspserver/Protocol.h.
|
inline |
Definition at line 79 of file lspserver/include/lspserver/Protocol.h.
References lspserver::URI::createFile(), and lspserver::URI::toString().
Referenced by lspserver::operator<<(), and lspserver::toJSON().
|
friend |
Definition at line 85 of file lspserver/include/lspserver/Protocol.h.
References URIForFile().
|
friend |
Definition at line 89 of file lspserver/include/lspserver/Protocol.h.
References URIForFile().
|
friend |
Definition at line 81 of file lspserver/include/lspserver/Protocol.h.
References URIForFile().