commit | 192133dfbb74a62a5229bfc565b75f69932782eb | [log] [tgz] |
---|---|---|
author | android-build-team Robot <android-build-team-robot@google.com> | Tue Oct 08 03:08:36 2019 +0000 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Tue Oct 08 03:08:36 2019 +0000 |
tree | 0d63602442b8632d4e1ce192154dcb2c95a1a01b | |
parent | 65c8e70f574d87df04f23af9b67b176bb4ef361b [diff] | |
parent | 3065fab46f072f67dd053da0d2c017638576e855 [diff] |
Snap for 5926043 from 3065fab46f072f67dd053da0d2c017638576e855 to rvc-release Change-Id: I641db1a2ab7a0f63664de08c6fd699581e3b9dea
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"