diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-11-28 16:18:04 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-11-28 17:16:26 +0900 |
commit | 301d02dd659ae8dea326684984710729401b92d1 (patch) | |
tree | 4fc5593ffc655ce4f24b57c2d113b8b2bcbd1d08 /cmd | |
parent | Make contributory properties unavailable except internal use (diff) | |
download | tre-301d02dd659ae8dea326684984710729401b92d1.tar.gz tre-301d02dd659ae8dea326684984710729401b92d1.tar.xz |
Support Script property (Meet RL1.2 of UTS #18 partially)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/generator/main.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cmd/generator/main.go b/cmd/generator/main.go index 2b4c23d..20dbc5f 100644 --- a/cmd/generator/main.go +++ b/cmd/generator/main.go @@ -43,6 +43,18 @@ func gen() error { return err } } + var scripts *ucd.Scripts + { + resp, err := http.Get("https://www.unicode.org/Public/13.0.0/ucd/Scripts.txt") + if err != nil { + return err + } + defer resp.Body.Close() + scripts, err = ucd.ParseScripts(resp.Body, propValAliases) + if err != nil { + return err + } + } var propList *ucd.PropList { resp, err := http.Get("https://www.unicode.org/Public/13.0.0/ucd/PropList.txt") @@ -63,11 +75,13 @@ func gen() error { err = tmpl.Execute(&b, struct { GeneratorName string UnicodeData *ucd.UnicodeData + Scripts *ucd.Scripts PropList *ucd.PropList PropertyValueAliases *ucd.PropertyValueAliases }{ GeneratorName: "generator/main.go", UnicodeData: unicodeData, + Scripts: scripts, PropList: propList, PropertyValueAliases: propValAliases, }) |