llvm/clang-tools-extra/clangd/URI.cpp

//===---- URI.h - File URIs with schemes -------------------------*- C++-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#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) {}

/// This manages file paths in the file system. All paths in the scheme
/// are absolute (with leading '/').
/// Note that this scheme is hardcoded into the library and not registered in
/// registry.
class FileSystemScheme : public URIScheme {};

llvm::Expected<std::unique_ptr<URIScheme>>
findSchemeByName(llvm::StringRef Scheme) {}

bool shouldEscape(unsigned char C) {}

/// Encodes a string according to percent-encoding.
/// - Unreserved characters are not escaped.
/// - Reserved characters always escaped with exceptions like '/'.
/// - All other characters are escaped.
void percentEncode(llvm::StringRef Content, std::string &Out) {}

/// Decodes a string according to percent-encoding.
std::string percentDecode(llvm::StringRef Content) {}

bool isValidScheme(llvm::StringRef Scheme) {}

} // namespace

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) {}

} // namespace clangd
} // namespace clang