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.
 
 
 

35 lines
796 B

  1. // Copyright 2015 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build ignore
  5. package main
  6. // elem is an entry of the width trie. The high byte is used to encode the type
  7. // of the rune. The low byte is used to store the index to a mapping entry in
  8. // the inverseData array.
  9. type elem uint16
  10. const (
  11. tagNeutral elem = iota << typeShift
  12. tagAmbiguous
  13. tagWide
  14. tagNarrow
  15. tagFullwidth
  16. tagHalfwidth
  17. )
  18. const (
  19. numTypeBits = 3
  20. typeShift = 16 - numTypeBits
  21. // tagNeedsFold is true for all fullwidth and halfwidth runes except for
  22. // the Won sign U+20A9.
  23. tagNeedsFold = 0x1000
  24. // The Korean Won sign is halfwidth, but SHOULD NOT be mapped to a wide
  25. // variant.
  26. wonSign rune = 0x20A9
  27. )