From 6bc2f38eb3919d0d1e0041202da95c51f43b5ad2 Mon Sep 17 00:00:00 2001 From: Charles Lew Date: Fri, 16 Sep 2022 00:00:50 +0800 Subject: [PATCH] Update to Unicode 15 and Bump version to 0.2.4 --- Cargo.toml | 2 +- README.md | 9 +++++++++ src/tables.rs | 41 ++++++++++++++++++++++++++++++++--------- 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 615ec30..fed55cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "unicode-xid" -version = "0.2.3" +version = "0.2.4" authors = ["erick.tryzelaar ", "kwantam ", "Manish Goregaokar " diff --git a/README.md b/README.md index 325d35e..7476843 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,15 @@ on std, and instead uses equivalent functions from core. # changelog +## 0.2.4 + +- Update to Unicode 15.0.0 +- Replace `const` tables with `static` tables. + +## 0.2.3 + +- Update to Unicode 14.0.0 + ## 0.2.2 - Add an ASCII fast-path diff --git a/src/tables.rs b/src/tables.rs index 3a891f1..c12e76c 100644 --- a/src/tables.rs +++ b/src/tables.rs @@ -14,7 +14,7 @@ /// The version of [Unicode](http://www.unicode.org/) /// that this version of unicode-xid is based on. -pub const UNICODE_VERSION: (u64, u64, u64) = (14, 0, 0); +pub const UNICODE_VERSION: (u64, u64, u64) = (15, 0, 0); fn bsearch_range_table(c: char, r: &[(char, char)]) -> bool { use core::cmp::Ordering::{Equal, Greater, Less}; @@ -196,7 +196,7 @@ pub mod derived_property { ('\u{cdd}', '\u{cde}'), ('\u{ce0}', '\u{ce3}'), ('\u{ce6}', '\u{cef}'), - ('\u{cf1}', '\u{cf2}'), + ('\u{cf1}', '\u{cf3}'), ('\u{d00}', '\u{d0c}'), ('\u{d0e}', '\u{d10}'), ('\u{d12}', '\u{d44}'), @@ -229,7 +229,7 @@ pub mod derived_property { ('\u{ea7}', '\u{ebd}'), ('\u{ec0}', '\u{ec4}'), ('\u{ec6}', '\u{ec6}'), - ('\u{ec8}', '\u{ecd}'), + ('\u{ec8}', '\u{ece}'), ('\u{ed0}', '\u{ed9}'), ('\u{edc}', '\u{edf}'), ('\u{f00}', '\u{f00}'), @@ -549,7 +549,7 @@ pub mod derived_property { ('\u{10e80}', '\u{10ea9}'), ('\u{10eab}', '\u{10eac}'), ('\u{10eb0}', '\u{10eb1}'), - ('\u{10f00}', '\u{10f1c}'), + ('\u{10efd}', '\u{10f1c}'), ('\u{10f27}', '\u{10f27}'), ('\u{10f30}', '\u{10f50}'), ('\u{10f70}', '\u{10f85}'), @@ -572,7 +572,7 @@ pub mod derived_property { ('\u{111dc}', '\u{111dc}'), ('\u{11200}', '\u{11211}'), ('\u{11213}', '\u{11237}'), - ('\u{1123e}', '\u{1123e}'), + ('\u{1123e}', '\u{11241}'), ('\u{11280}', '\u{11286}'), ('\u{11288}', '\u{11288}'), ('\u{1128a}', '\u{1128d}'), @@ -653,12 +653,17 @@ pub mod derived_property { ('\u{11d93}', '\u{11d98}'), ('\u{11da0}', '\u{11da9}'), ('\u{11ee0}', '\u{11ef6}'), + ('\u{11f00}', '\u{11f10}'), + ('\u{11f12}', '\u{11f3a}'), + ('\u{11f3e}', '\u{11f42}'), + ('\u{11f50}', '\u{11f59}'), ('\u{11fb0}', '\u{11fb0}'), ('\u{12000}', '\u{12399}'), ('\u{12400}', '\u{1246e}'), ('\u{12480}', '\u{12543}'), ('\u{12f90}', '\u{12ff0}'), - ('\u{13000}', '\u{1342e}'), + ('\u{13000}', '\u{1342f}'), + ('\u{13440}', '\u{13455}'), ('\u{14400}', '\u{14646}'), ('\u{16800}', '\u{16a38}'), ('\u{16a40}', '\u{16a5e}'), @@ -686,7 +691,9 @@ pub mod derived_property { ('\u{1aff5}', '\u{1affb}'), ('\u{1affd}', '\u{1affe}'), ('\u{1b000}', '\u{1b122}'), + ('\u{1b132}', '\u{1b132}'), ('\u{1b150}', '\u{1b152}'), + ('\u{1b155}', '\u{1b155}'), ('\u{1b164}', '\u{1b167}'), ('\u{1b170}', '\u{1b2fb}'), ('\u{1bc00}', '\u{1bc6a}'), @@ -740,17 +747,21 @@ pub mod derived_property { ('\u{1da9b}', '\u{1da9f}'), ('\u{1daa1}', '\u{1daaf}'), ('\u{1df00}', '\u{1df1e}'), + ('\u{1df25}', '\u{1df2a}'), ('\u{1e000}', '\u{1e006}'), ('\u{1e008}', '\u{1e018}'), ('\u{1e01b}', '\u{1e021}'), ('\u{1e023}', '\u{1e024}'), ('\u{1e026}', '\u{1e02a}'), + ('\u{1e030}', '\u{1e06d}'), + ('\u{1e08f}', '\u{1e08f}'), ('\u{1e100}', '\u{1e12c}'), ('\u{1e130}', '\u{1e13d}'), ('\u{1e140}', '\u{1e149}'), ('\u{1e14e}', '\u{1e14e}'), ('\u{1e290}', '\u{1e2ae}'), ('\u{1e2c0}', '\u{1e2f9}'), + ('\u{1e4d0}', '\u{1e4f9}'), ('\u{1e7e0}', '\u{1e7e6}'), ('\u{1e7e8}', '\u{1e7eb}'), ('\u{1e7ed}', '\u{1e7ee}'), @@ -794,12 +805,13 @@ pub mod derived_property { ('\u{1eeab}', '\u{1eebb}'), ('\u{1fbf0}', '\u{1fbf9}'), ('\u{20000}', '\u{2a6df}'), - ('\u{2a700}', '\u{2b738}'), + ('\u{2a700}', '\u{2b739}'), ('\u{2b740}', '\u{2b81d}'), ('\u{2b820}', '\u{2cea1}'), ('\u{2ceb0}', '\u{2ebe0}'), ('\u{2f800}', '\u{2fa1d}'), ('\u{30000}', '\u{3134a}'), + ('\u{31350}', '\u{323af}'), ('\u{e0100}', '\u{e01ef}'), ]; @@ -1283,6 +1295,7 @@ pub mod derived_property { ('\u{111dc}', '\u{111dc}'), ('\u{11200}', '\u{11211}'), ('\u{11213}', '\u{1122b}'), + ('\u{1123f}', '\u{11240}'), ('\u{11280}', '\u{11286}'), ('\u{11288}', '\u{11288}'), ('\u{1128a}', '\u{1128d}'), @@ -1345,12 +1358,16 @@ pub mod derived_property { ('\u{11d6a}', '\u{11d89}'), ('\u{11d98}', '\u{11d98}'), ('\u{11ee0}', '\u{11ef2}'), + ('\u{11f02}', '\u{11f02}'), + ('\u{11f04}', '\u{11f10}'), + ('\u{11f12}', '\u{11f33}'), ('\u{11fb0}', '\u{11fb0}'), ('\u{12000}', '\u{12399}'), ('\u{12400}', '\u{1246e}'), ('\u{12480}', '\u{12543}'), ('\u{12f90}', '\u{12ff0}'), - ('\u{13000}', '\u{1342e}'), + ('\u{13000}', '\u{1342f}'), + ('\u{13441}', '\u{13446}'), ('\u{14400}', '\u{14646}'), ('\u{16800}', '\u{16a38}'), ('\u{16a40}', '\u{16a5e}'), @@ -1373,7 +1390,9 @@ pub mod derived_property { ('\u{1aff5}', '\u{1affb}'), ('\u{1affd}', '\u{1affe}'), ('\u{1b000}', '\u{1b122}'), + ('\u{1b132}', '\u{1b132}'), ('\u{1b150}', '\u{1b152}'), + ('\u{1b155}', '\u{1b155}'), ('\u{1b164}', '\u{1b167}'), ('\u{1b170}', '\u{1b2fb}'), ('\u{1bc00}', '\u{1bc6a}'), @@ -1411,11 +1430,14 @@ pub mod derived_property { ('\u{1d7aa}', '\u{1d7c2}'), ('\u{1d7c4}', '\u{1d7cb}'), ('\u{1df00}', '\u{1df1e}'), + ('\u{1df25}', '\u{1df2a}'), + ('\u{1e030}', '\u{1e06d}'), ('\u{1e100}', '\u{1e12c}'), ('\u{1e137}', '\u{1e13d}'), ('\u{1e14e}', '\u{1e14e}'), ('\u{1e290}', '\u{1e2ad}'), ('\u{1e2c0}', '\u{1e2eb}'), + ('\u{1e4d0}', '\u{1e4eb}'), ('\u{1e7e0}', '\u{1e7e6}'), ('\u{1e7e8}', '\u{1e7eb}'), ('\u{1e7ed}', '\u{1e7ee}'), @@ -1457,12 +1479,13 @@ pub mod derived_property { ('\u{1eea5}', '\u{1eea9}'), ('\u{1eeab}', '\u{1eebb}'), ('\u{20000}', '\u{2a6df}'), - ('\u{2a700}', '\u{2b738}'), + ('\u{2a700}', '\u{2b739}'), ('\u{2b740}', '\u{2b81d}'), ('\u{2b820}', '\u{2cea1}'), ('\u{2ceb0}', '\u{2ebe0}'), ('\u{2f800}', '\u{2fa1d}'), ('\u{30000}', '\u{3134a}'), + ('\u{31350}', '\u{323af}'), ]; pub fn XID_Start(c: char) -> bool {