#include "URI.h"
#include "support/Logger.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/Path.h"
#include <algorithm>
LLVM_INSTANTIATE_REGISTRY(…)
namespace clang {
namespace clangd {
namespace {
bool isWindowsPath(llvm::StringRef Path) { … }
bool isNetworkPath(llvm::StringRef Path) { … }
class FileSystemScheme : public URIScheme { … };
llvm::Expected<std::unique_ptr<URIScheme>>
findSchemeByName(llvm::StringRef Scheme) { … }
bool shouldEscape(unsigned char C) { … }
void percentEncode(llvm::StringRef Content, std::string &Out) { … }
std::string percentDecode(llvm::StringRef Content) { … }
bool isValidScheme(llvm::StringRef Scheme) { … }
}
URI::URI(llvm::StringRef Scheme, llvm::StringRef Authority,
llvm::StringRef Body)
: … { … }
std::string URI::toString() const { … }
llvm::Expected<URI> URI::parse(llvm::StringRef OrigUri) { … }
llvm::Expected<std::string> URI::resolve(llvm::StringRef FileURI,
llvm::StringRef HintPath) { … }
llvm::Expected<URI> URI::create(llvm::StringRef AbsolutePath,
llvm::StringRef Scheme) { … }
URI URI::create(llvm::StringRef AbsolutePath) { … }
URI URI::createFile(llvm::StringRef AbsolutePath) { … }
llvm::Expected<std::string> URI::resolve(const URI &Uri,
llvm::StringRef HintPath) { … }
llvm::Expected<std::string> URI::resolvePath(llvm::StringRef AbsPath,
llvm::StringRef HintPath) { … }
llvm::Expected<std::string> URI::includeSpelling(const URI &Uri) { … }
}
}