| commit | 7d8851e5da6f416e702b390fea1360c9b6e4e263 | [log] [tgz] |
|---|---|---|
| author | Xin Li <[email protected]> | Wed Oct 30 14:01:44 2019 -0700 |
| committer | android-build-merger <[email protected]> | Wed Oct 30 14:01:44 2019 -0700 |
| tree | 32b3c34db61ae50756c47cee698fe29a6f0e8ba7 | |
| parent | 4cce3021324ac338529baca49e2430d5cc9845a5 [diff] | |
| parent | 6767cb6c7411395ce736b966f23d4e24a230b779 [diff] |
DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master am: 6767cb6c74 Change-Id: I7b621eeec0f1f057b5603973c5539429f3b7c095
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"