commit | 9d6d2f628ddec43169f00dd2e443af5f2000eef0 | [log] [tgz] |
---|---|---|
author | android-build-team Robot <[email protected]> | Thu Oct 31 03:12:32 2019 +0000 |
committer | android-build-team Robot <[email protected]> | Thu Oct 31 03:12:32 2019 +0000 |
tree | 32b3c34db61ae50756c47cee698fe29a6f0e8ba7 | |
parent | 872a7bd71ccfdef9ed8c090fa3a11ff317a499c0 [diff] | |
parent | 6b18de1d8fb6da7cfce48c33aa05e6a85db07329 [diff] |
Snap for 5978242 from 6b18de1d8fb6da7cfce48c33aa05e6a85db07329 to rvc-release Change-Id: I90ec85a4367b1e3bdaff6b4b34510a8efb0eeb32
Determine if a char
is a valid identifier for a parser and/or lexer according to Unicode Standard Annex #31 rules.
extern crate unicode_xid; use unicode_xid::UnicodeXID; fn main() { let ch = 'a'; println!("Is {} a valid start of an identifier? {}", ch, UnicodeXID::is_xid_start(ch)); }
unicode-xid supports a no_std
feature. This eliminates dependence on std, and instead uses equivalent functions from core.
You can use this package in your project by adding the following to your Cargo.toml
:
[dependencies] unicode-xid = "0.1.0"