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 5//go:build ignore 6// +build ignore 7 8package main 9 10// elem is an entry of the width trie. The high byte is used to encode the type 11// of the rune. The low byte is used to store the index to a mapping entry in 12// the inverseData array. 13type elem uint16 14 15const ( 16 tagNeutral elem = iota << typeShift 17 tagAmbiguous 18 tagWide 19 tagNarrow 20 tagFullwidth 21 tagHalfwidth 22) 23 24const ( 25 numTypeBits = 3 26 typeShift = 16 - numTypeBits 27 28 // tagNeedsFold is true for all fullwidth and halfwidth runes except for 29 // the Won sign U+20A9. 30 tagNeedsFold = 0x1000 31 32 // The Korean Won sign is halfwidth, but SHOULD NOT be mapped to a wide 33 // variant. 34 wonSign rune = 0x20A9 35) 36