本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.6KB

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