diff options
Diffstat (limited to 'vendor/golang.org/x/text/internal/number/common.go')
-rw-r--r-- | vendor/golang.org/x/text/internal/number/common.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vendor/golang.org/x/text/internal/number/common.go b/vendor/golang.org/x/text/internal/number/common.go index e428a728d..052876e5e 100644 --- a/vendor/golang.org/x/text/internal/number/common.go +++ b/vendor/golang.org/x/text/internal/number/common.go @@ -33,8 +33,19 @@ const ( NumSymbolTypes ) +const hasNonLatnMask = 0x8000 + +// symOffset is an offset into altSymData if the bit indicated by hasNonLatnMask +// is not 0 (with this bit masked out), and an offset into symIndex otherwise. +// +// TODO: this type can be a byte again if we use an indirection into altsymData +// and introduce an alt -> offset slice (the length of this will be number of +// alternatives plus 1). This also allows getting rid of the compactTag field +// in altSymData. In total this will save about 1K. +type symOffset uint16 + type altSymData struct { compactTag uint16 + symIndex symOffset system system - symIndex byte } |