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