]> Cypherpunks repositories - gostls13.git/commitdiff
unicode: document large var blocks and the SpecialCase vars.
authorDavid Symonds <dsymonds@golang.org>
Sat, 4 Feb 2012 07:35:37 +0000 (18:35 +1100)
committerDavid Symonds <dsymonds@golang.org>
Sat, 4 Feb 2012 07:35:37 +0000 (18:35 +1100)
Fixes #2772.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5631047

src/pkg/unicode/casetables.go
src/pkg/unicode/maketables.go
src/pkg/unicode/tables.go

index 86336b1b908fcc1db67b89bc8a42628311a7a232..29bf167e56b62039930cf275e4e807cda7da20da 100644 (file)
@@ -9,7 +9,7 @@
 
 package unicode
 
-var TurkishCase = _TurkishCase
+var TurkishCase SpecialCase = _TurkishCase
 var _TurkishCase = SpecialCase{
        CaseRange{0x0049, 0x0049, d{0, 0x131 - 0x49, 0}},
        CaseRange{0x0069, 0x0069, d{0x130 - 0x69, 0, 0x130 - 0x69}},
@@ -17,4 +17,4 @@ var _TurkishCase = SpecialCase{
        CaseRange{0x0131, 0x0131, d{0x49 - 0x131, 0, 0x49 - 0x131}},
 }
 
-var AzeriCase = _TurkishCase
+var AzeriCase SpecialCase = _TurkishCase
index ba39fecdb3d2ecec42d8c9a7b55de21bcda855df..818685d6c5e47a664defc1cd7a2ee229c8f7e968 100644 (file)
@@ -486,6 +486,7 @@ func printCategories() {
                        func(code rune) bool { return chars[code].category == name })
        }
        decl.Sort()
+       fmt.Println("// The following variables are of type *RangeTable:")
        fmt.Println("var (")
        for _, d := range decl {
                fmt.Print(d)
@@ -768,6 +769,7 @@ func printScriptOrProperty(doProps bool) {
                fmt.Print("}\n\n")
        }
        decl.Sort()
+       fmt.Println("// The following variables are of type *RangeTable:")
        fmt.Println("var (")
        for _, d := range decl {
                fmt.Print(d)
index a3b882625ef5affae0f3de4dccf9a32904261f15..978c48ae43ee9115e6932208cdbe895bf1a8da26 100644 (file)
@@ -2701,6 +2701,7 @@ var _Zs = &RangeTable{
        },
 }
 
+// The following variables are of type *RangeTable:
 var (
        Cc     = _Cc // Cc is the set of Unicode characters in category Cc.
        Cf     = _Cf // Cf is the set of Unicode characters in category Cf.
@@ -4053,6 +4054,7 @@ var _Yi = &RangeTable{
        },
 }
 
+// The following variables are of type *RangeTable:
 var (
        Arabic                 = _Arabic                 // Arabic is the set of Unicode characters in script Arabic.
        Armenian               = _Armenian               // Armenian is the set of Unicode characters in script Armenian.
@@ -5114,6 +5116,7 @@ var _White_Space = &RangeTable{
        },
 }
 
+// The following variables are of type *RangeTable:
 var (
        ASCII_Hex_Digit                    = _ASCII_Hex_Digit                    // ASCII_Hex_Digit is the set of Unicode characters with property ASCII_Hex_Digit.
        Bidi_Control                       = _Bidi_Control                       // Bidi_Control is the set of Unicode characters with property Bidi_Control.