diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-11-03 15:18:45 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-11-21 13:18:08 -0800 |
| commit | f39c29d0bc0e58d76e2289dc52038770797a8f38 (patch) | |
| tree | acebe53ed356d92664a3e76969d7405b5cab9be2 /src/libunicode | |
| parent | 76ddd2b1547dd461d0487233a0a19674292c976e (diff) | |
unicode: Rename is_XID_start to is_xid_start, is_XID_continue to is_xid_continue
Diffstat (limited to 'src/libunicode')
| -rw-r--r-- | src/libunicode/u_char.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/libunicode/u_char.rs b/src/libunicode/u_char.rs index f347ab6a21e..1c4c4d4c4be 100644 --- a/src/libunicode/u_char.rs +++ b/src/libunicode/u_char.rs @@ -167,8 +167,18 @@ pub trait UnicodeChar { /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), /// mostly similar to ID_Start but modified for closure under NFKx. #[allow(non_snake_case)] + #[deprecated = "use is_xid_start"] fn is_XID_start(self) -> bool; + /// Returns whether the specified character satisfies the 'XID_Start' + /// Unicode property. + /// + /// 'XID_Start' is a Unicode Derived Property specified in + /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), + /// mostly similar to ID_Start but modified for closure under NFKx. + #[allow(non_snake_case)] + fn is_xid_start(self) -> bool; + /// Returns whether the specified `char` satisfies the 'XID_Continue' /// Unicode property. /// @@ -176,8 +186,17 @@ pub trait UnicodeChar { /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), /// mostly similar to 'ID_Continue' but modified for closure under NFKx. #[allow(non_snake_case)] + #[deprecated = "use is_xid_continue"] fn is_XID_continue(self) -> bool; + /// Returns whether the specified `char` satisfies the 'XID_Continue' + /// Unicode property. + /// + /// 'XID_Continue' is a Unicode Derived Property specified in + /// [UAX #31](http://unicode.org/reports/tr31/#NFKC_Modifications), + /// mostly similar to 'ID_Continue' but modified for closure under NFKx. + #[allow(non_snake_case)] + fn is_xid_continue(self) -> bool; /// Indicates whether a character is in lowercase. /// @@ -267,10 +286,16 @@ impl UnicodeChar for char { } } + #[deprecated = "use is_xid_start"] fn is_XID_start(self) -> bool { derived_property::XID_Start(self) } + #[deprecated = "use is_xid_continue"] fn is_XID_continue(self) -> bool { derived_property::XID_Continue(self) } + fn is_xid_start(self) -> bool { derived_property::XID_Start(self) } + + fn is_xid_continue(self) -> bool { derived_property::XID_Continue(self) } + fn is_lowercase(self) -> bool { match self { 'a' ... 'z' => true, |
