unicode

Branch: main

Switch branches or tags

Branch: main
Go to file t

413 files indexed

History
Code

tools/ucd/types.mbt
1///|2/// The decomposition mapping of one code point. UnicodeData.txt gives a3/// code point either a canonical or a compatibility mapping, never both.4priv struct Decomposition {5  code_point : Int326  code_points : Array[Int32]7  compatibility : Bool8}910///|11priv struct SimpleMappingEntry {12  code_point : Int3213  target : Int3214}1516///|17priv struct FullMappingEntry {18  code_point : Int3219  targets : Array[Int32]20}2122///|23/// The fields of `UnicodeData.txt` the generators use.24struct UnicodeData {25  /// General_Category ordinal of every code point; see `gc_ordinal`.26  general_categories : FixedArray[Int32]27  /// Canonical_Combining_Class of every code point.28  ccc : FixedArray[Int32]29  /// Decomposition mappings, sorted by code point. Their order is the row30  /// order of the decomposition arrays and the norm16 records.31  decompositions : Array[Decomposition]32  simple_uppercase : Array[SimpleMappingEntry]33  simple_lowercase : Array[SimpleMappingEntry]34  simple_titlecase : Array[SimpleMappingEntry]35}3637///|38/// The unconditional mappings of `SpecialCasing.txt`.39struct SpecialCasingData {40  lower_mapping : Array[FullMappingEntry]41  title_mapping : Array[FullMappingEntry]42  upper_mapping : Array[FullMappingEntry]43}4445///|46priv struct CompositionEntry {47  first : Int3248  second : Int3249  result : Int3250}51