Source file src/vendor/golang.org/x/text/unicode/bidi/trieval.go

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

View as plain text