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