From f39c29d0bc0e58d76e2289dc52038770797a8f38 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 3 Nov 2014 15:18:45 -0800 Subject: unicode: Rename is_XID_start to is_xid_start, is_XID_continue to is_xid_continue --- src/libunicode/u_char.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/libunicode') 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, -- cgit 1.4.1-3-g733a5