1 // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
5 // Form defines a plural form.
7 // Not all languages support all forms. Also, the meaning of each form varies
8 // per language. It is important to note that the name of a form does not
9 // necessarily correspond one-to-one with the set of numbers. For instance,
10 // for Croation, One matches not only 1, but also 11, 21, etc.
12 // Each language must at least support the form "other".
24 var countMap = map[string]Form{
33 type pluralCheck struct {
41 // opID identifies the type of operand in the plural rule, being i, n or f.
42 // (v, w, and t are treated as filters in our implementation.)
46 opMod opID = 0x1 // is '%' used?
47 opNotEqual opID = 0x2 // using "!=" to compare
48 opI opID = 0 << 2 // integers after taking the absolute value
49 opN opID = 1 << 2 // full number (must be integer)
50 opF opID = 2 << 2 // fraction
51 opV opID = 3 << 2 // number of visible digits
52 opW opID = 4 << 2 // number of visible digits without trailing zeros
53 opBretonM opID = 5 << 2 // hard-wired rule for Breton
54 opItalian800 opID = 6 << 2 // hard-wired rule for Italian
55 opAzerbaijan00s opID = 7 << 2 // hard-wired rule for Azerbaijan
58 // Use this plural form to indicate the next rule needs to match as well.
59 // The last condition in the list will have the correct plural form.
65 // numN indicates the maximum integer, or maximum mod value, for which we
66 // have inclusion masks.
68 // The common denominator of the modulo that is taken.