aboutsummaryrefslogtreecommitdiff
path: root/cmd/generator/main.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cmd/generator/main.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/cmd/generator/main.go b/cmd/generator/main.go
index 3edcef5..ae57709 100644
--- a/cmd/generator/main.go
+++ b/cmd/generator/main.go
@@ -43,6 +43,18 @@ func gen() error {
return err
}
}
+ var propList *ucd.PropList
+ {
+ resp, err := http.Get("https://www.unicode.org/Public/13.0.0/ucd/PropList.txt")
+ if err != nil {
+ return err
+ }
+ defer resp.Body.Close()
+ propList, err = ucd.ParsePropList(resp.Body)
+ if err != nil {
+ return err
+ }
+ }
tmpl, err := template.ParseFiles("../compiler/ucd_table.go.tmpl")
if err != nil {
return err
@@ -51,10 +63,12 @@ func gen() error {
err = tmpl.Execute(&b, struct {
GeneratorName string
UnicodeData *ucd.UnicodeData
+ PropList *ucd.PropList
PropertyValueAliases *ucd.PropertyValueAliases
}{
GeneratorName: "generator/main.go",
UnicodeData: unicodeData,
+ PropList: propList,
PropertyValueAliases: propValAliases,
})
if err != nil {