chromium/third_party/zxcvbn-cpp/native-src/zxcvbn/common.hpp

#ifndef __ZXCVBN__COMMON_HPP
#define __ZXCVBN__COMMON_HPP

#include <zxcvbn/frequency_lists.hpp>
#include <zxcvbn/adjacency_graphs.hpp>

#include <regex>
#include <string>

#include <cassert>

namespace zxcvbn {

guesses_t;
guesses_log10_t;
score_t;
idx_t;

// Add new match types here
#define MATCH_RUN()

enum class RegexTag {};

enum class SequenceTag {};

struct PortableRegexMatch {};

#define MATCH_FN
enum class MatchPattern {};
#undef MATCH_FN

struct DictionaryMatch {};

struct SpatialMatch {};

class Match;

struct RepeatMatch {};

struct SequenceMatch {};

struct RegexMatch {};

struct DateMatch {};

struct BruteforceMatch {};

struct UnknownMatch {};

// Define new match types here

class Match {};

template<class T>
struct pattern_type_to_pmc;

#define MATCH_FN

MATCH_RUN()

#undef MATCH_FN

template<class T>
Match::Match(idx_t i_, idx_t j_, std::string token,
             T && val) :
  i(i_), j(j_), token(std::move(token)),
  guesses(), guesses_log10(), idx(), jdx() {}

}

#endif