Searched refs:TokenDatabase (Results 1 – 10 of 10) sorted by relevance
30 alignas(TokenDatabase::RawEntry) constexpr char kBasicData[] =39 alignas(TokenDatabase::RawEntry) constexpr char kEmptyData[] =42 alignas(TokenDatabase::RawEntry) constexpr char kBadMagic[] =47 alignas(TokenDatabase::RawEntry) constexpr char kBadVersion[] =50 alignas(TokenDatabase::RawEntry) constexpr char kBadEntryCount[] =55 alignas(TokenDatabase::RawEntry) constexpr signed char kSignedWithTopBit[] =80 constexpr TokenDatabase kBasicDatabase = TokenDatabase::Create<kBasicData>();83 TEST(TokenDatabase, EntryCount) { in TEST() argument84 static_assert(TokenDatabase::Create<kBasicData>().size() == 3u); in TEST()85 static_assert(TokenDatabase::Create(kEmptyData).size() == 0u); in TEST()[all …]
19 TokenDatabase::Entry TokenDatabase::Entries::operator[](size_t index) const { in operator []()27 TokenDatabase::Entries TokenDatabase::Find(const uint32_t token) const { in Find()
31 alignas(TokenDatabase::RawEntry) constexpr char kBasicData[] =46 Detokenize() : detok_(TokenDatabase::Create<kBasicData>()) {} in Detokenize()100 alignas(TokenDatabase::RawEntry) constexpr char kDataWithArguments[] =123 constexpr TokenDatabase kWithArgs = TokenDatabase::Create<kDataWithArguments>();189 alignas(TokenDatabase::RawEntry) constexpr char kDataWithCollisions[] =225 constexpr TokenDatabase kWithCollisions =226 TokenDatabase::Create<kDataWithCollisions>();
52 void IterateOverDatabase(TokenDatabase* const database) { in IterateOverDatabase()53 for (TokenDatabase::Entry entry : *database) { in IterateOverDatabase()121 auto token_database = TokenDatabase::Create<std::span<uint8_t>>(data_span); in LLVMFuzzerTestOneInput()
47 alignas(TokenDatabase::RawEntry) constexpr char kBasicData[] =63 static Detokenizer detokenizer(TokenDatabase::Create<kBasicData>()); in LLVMFuzzerTestOneInput()
100 Detokenizer::Detokenizer(const TokenDatabase& database) { in Detokenizer()
803 ``TokenDatabase::Create``, and construct a detokenizer.807 Detokenizer detokenizer(TokenDatabase::Create(token_database_array));813 The ``TokenDatabase`` class verifies that its data is valid before using it. If814 it is invalid, the ``TokenDatabase::Create`` returns an empty database for which821 constexpr TokenDatabase kDefaultDatabase = TokenDatabase::Create<kData>();826 TokenDatabase database = TokenDatabase::Create(data);829 // TokenDatabase that failed to load (it will be empty), but it may be
54 class TokenDatabase {172 static constexpr TokenDatabase Create() { in Create()180 return TokenDatabase(std::data(kDatabaseBytes)); in Create()191 static constexpr TokenDatabase Create(const ByteArray& database_bytes) { in Create()193 ? TokenDatabase(std::data(database_bytes)) in Create()194 : TokenDatabase(); // Invalid database. in Create()197 constexpr TokenDatabase() : begin_{.data = nullptr}, end_{.data = nullptr} {} in TokenDatabase() function283 constexpr TokenDatabase(const Byte bytes[]) in TokenDatabase() function284 : TokenDatabase(bytes + sizeof(Header), in TokenDatabase()293 constexpr TokenDatabase(const char* begin, const char* end) in TokenDatabase() function[all …]
79 Detokenizer(const TokenDatabase& database);
60 TokenDatabase tokens = TokenDatabase::Create(std::span(data, size)); in DETOKENIZER_METHOD()62 PointerToHandle(new Detokenizer(tokens.ok() ? tokens : TokenDatabase())); in DETOKENIZER_METHOD()