github.com/icodeface/tls@v0.0.0-20230910023335-34df9250cd12/internal/x/text/unicode/bidi/trieval.go (about) 1 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 3 // Code generated by running "go generate" in internal/x/text. DO NOT EDIT. 4 5 package bidi 6 7 // Class is the Unicode BiDi class. Each rune has a single class. 8 type Class uint 9 10 const ( 11 L Class = iota // LeftToRight 12 R // RightToLeft 13 EN // EuropeanNumber 14 ES // EuropeanSeparator 15 ET // EuropeanTerminator 16 AN // ArabicNumber 17 CS // CommonSeparator 18 B // ParagraphSeparator 19 S // SegmentSeparator 20 WS // WhiteSpace 21 ON // OtherNeutral 22 BN // BoundaryNeutral 23 NSM // NonspacingMark 24 AL // ArabicLetter 25 Control // Control LRO - PDI 26 27 numClass 28 29 LRO // LeftToRightOverride 30 RLO // RightToLeftOverride 31 LRE // LeftToRightEmbedding 32 RLE // RightToLeftEmbedding 33 PDF // PopDirectionalFormat 34 LRI // LeftToRightIsolate 35 RLI // RightToLeftIsolate 36 FSI // FirstStrongIsolate 37 PDI // PopDirectionalIsolate 38 39 unknownClass = ^Class(0) 40 ) 41 42 var controlToClass = map[rune]Class{ 43 0x202D: LRO, // LeftToRightOverride, 44 0x202E: RLO, // RightToLeftOverride, 45 0x202A: LRE, // LeftToRightEmbedding, 46 0x202B: RLE, // RightToLeftEmbedding, 47 0x202C: PDF, // PopDirectionalFormat, 48 0x2066: LRI, // LeftToRightIsolate, 49 0x2067: RLI, // RightToLeftIsolate, 50 0x2068: FSI, // FirstStrongIsolate, 51 0x2069: PDI, // PopDirectionalIsolate, 52 } 53 54 // A trie entry has the following bits: 55 // 7..5 XOR mask for brackets 56 // 4 1: Bracket open, 0: Bracket close 57 // 3..0 Class type 58 59 const ( 60 openMask = 0x10 61 xorMaskShift = 5 62 )