chromium/third_party/liburlpattern/pattern.cc

// Copyright 2020 The Chromium Authors
// Copyright 2014 Blake Embrey ([email protected])
// Use of this source code is governed by an MIT-style license that can be
// found in the LICENSE file or at https://opensource.org/licenses/MIT.

#include "third_party/liburlpattern/pattern.h"

#include <optional>
#include <string_view>

#include "third_party/abseil-cpp/absl/base/macros.h"
#include "third_party/abseil-cpp/absl/strings/str_format.h"
#include "third_party/icu/source/common/unicode/utf8.h"
#include "third_party/liburlpattern/utils.h"

namespace liburlpattern {

namespace {

void AppendModifier(Modifier modifier, std::string& append_target) {}

size_t ModifierLength(Modifier modifier) {}

}  // namespace

std::ostream& operator<<(std::ostream& o, Part part) {}

Part::Part(PartType t, std::string v, Modifier m)
    :{}

Part::Part(PartType t,
           std::string n,
           std::string p,
           std::string v,
           std::string s,
           Modifier m)
    :{}

bool Part::HasCustomName() const {}

Pattern::Pattern(std::vector<Part> part_list,
                 Options options,
                 std::string segment_wildcard_regex)
    :{}

std::string Pattern::GeneratePatternString() const {}

// The following code is a translation from the path-to-regexp typescript at:
//
//  https://github.com/pillarjs/path-to-regexp/blob/125c43e6481f68cc771a5af22b914acdb8c5ba1f/src/index.ts#L532-L596
std::string Pattern::GenerateRegexString(
    std::vector<std::string>* name_list_out) const {}

bool Pattern::HasRegexGroups() const {}

bool Pattern::CanDirectMatch() const {}

bool Pattern::DirectMatch(
    std::string_view input,
    std::vector<
        std::pair<std::string_view, std::optional<std::string_view>>>*
        group_list_out) const {}

size_t Pattern::RegexStringLength() const {}

void Pattern::AppendDelimiterList(std::string& append_target) const {}

size_t Pattern::DelimiterListLength() const {}

void Pattern::AppendEndsWith(std::string& append_target) const {}

size_t Pattern::EndsWithLength() const {}

bool Pattern::IsOnlyFullWildcard() const {}

bool Pattern::IsOnlyFixedText() const {}

}  // namespace liburlpattern