trieval.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
  2. package precis
  3. // entry is the entry of a trie table
  4. // 7..6 property (unassigned, disallowed, maybe, valid)
  5. // 5..0 category
  6. type entry uint8
  7. const (
  8. propShift = 6
  9. propMask = 0xc0
  10. catMask = 0x3f
  11. )
  12. func (e entry) property() property { return property(e & propMask) }
  13. func (e entry) category() category { return category(e & catMask) }
  14. type property uint8
  15. // The order of these constants matter. A Profile may consider runes to be
  16. // allowed either from pValid or idDisOrFreePVal.
  17. const (
  18. unassigned property = iota << propShift
  19. disallowed
  20. idDisOrFreePVal // disallowed for Identifier, pValid for FreeForm
  21. pValid
  22. )
  23. // compute permutations of all properties and specialCategories.
  24. type category uint8
  25. const (
  26. other category = iota
  27. // Special rune types
  28. joiningL
  29. joiningD
  30. joiningT
  31. joiningR
  32. viramaModifier
  33. viramaJoinT // Virama + JoiningT
  34. latinSmallL // U+006c
  35. greek
  36. greekJoinT // Greek + JoiningT
  37. hebrew
  38. hebrewJoinT // Hebrew + JoiningT
  39. japanese // hirigana, katakana, han
  40. // Special rune types associated with contextual rules defined in
  41. // https://tools.ietf.org/html/rfc5892#appendix-A.
  42. // ContextO
  43. zeroWidthNonJoiner // rule 1
  44. zeroWidthJoiner // rule 2
  45. // ContextJ
  46. middleDot // rule 3
  47. greekLowerNumeralSign // rule 4
  48. hebrewPreceding // rule 5 and 6
  49. katakanaMiddleDot // rule 7
  50. arabicIndicDigit // rule 8
  51. extendedArabicIndicDigit // rule 9
  52. numCategories
  53. )