// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifdef UNSAFE_BUFFERS_BUILD // TODO(crbug.com/351564777): Remove this and convert code to safer constructs. #pragma allow_unsafe_buffers #endif #include "third_party/blink/renderer/platform/text/mathml_operator_dictionary.h" #include "base/notreached.h" #include "third_party/blink/renderer/platform/wtf/text/character_names.h" namespace blink { namespace { // https://w3c.github.io/mathml-core/#operator-dictionary-compact-special-tables const char* operators_2_ascii_chars[] = …; // https://w3c.github.io/mathml-core/#operator-dictionary-categories-hexa-table struct EntryRange { … }; static inline uint16_t ExtractKey(const EntryRange& range) { … } static inline uint16_t ExtractCategory(const EntryRange& range) { … } // The following representation is taken from the spec, and reduces storage // requirements by mapping codepoints and category to better make use of the // available bytes. For details see // https://w3c.github.io/mathml-core/#operator-dictionary. // It was automatically generated from the spec's script: // https://github.com/w3c/mathml-core/blob/main/tables/operator-dictionary.py static const EntryRange compact_dictionary[] = …; } // namespace MathMLOperatorDictionaryCategory FindCategory( const String& content, MathMLOperatorDictionaryForm form) { … } } // namespace blink