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.
 
 
 

56 lines
1.3 KiB

  1. // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
  2. package number
  3. import (
  4. "unicode/utf8"
  5. "golang.org/x/text/internal/language/compact"
  6. )
  7. // A system identifies a CLDR numbering system.
  8. type system byte
  9. type systemData struct {
  10. id system
  11. digitSize byte // number of UTF-8 bytes per digit
  12. zero [utf8.UTFMax]byte // UTF-8 sequence of zero digit.
  13. }
  14. // A SymbolType identifies a symbol of a specific kind.
  15. type SymbolType int
  16. const (
  17. SymDecimal SymbolType = iota
  18. SymGroup
  19. SymList
  20. SymPercentSign
  21. SymPlusSign
  22. SymMinusSign
  23. SymExponential
  24. SymSuperscriptingExponent
  25. SymPerMille
  26. SymInfinity
  27. SymNan
  28. SymTimeSeparator
  29. NumSymbolTypes
  30. )
  31. const hasNonLatnMask = 0x8000
  32. // symOffset is an offset into altSymData if the bit indicated by hasNonLatnMask
  33. // is not 0 (with this bit masked out), and an offset into symIndex otherwise.
  34. //
  35. // TODO: this type can be a byte again if we use an indirection into altsymData
  36. // and introduce an alt -> offset slice (the length of this will be number of
  37. // alternatives plus 1). This also allows getting rid of the compactTag field
  38. // in altSymData. In total this will save about 1K.
  39. type symOffset uint16
  40. type altSymData struct {
  41. compactTag compact.ID
  42. symIndex symOffset
  43. system system
  44. }