commit | 2acf2ddb9c37c8c7c1e18f7fb32492ba7cca3015 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Tue Feb 16 21:00:28 2021 -0800 |
committer | Linux Build Service Account <lnxbuild@localhost> | Tue Feb 16 21:00:28 2021 -0800 |
tree | f797216b35764bd1fe77fe7a569c9992241a6048 | |
parent | 85363e7057582c3c34a252a28f3b5cf9bd02a6a3 [diff] | |
parent | d60ba9b03b4a81d52d00282819271edb9e8144b3 [diff] |
Merge d60ba9b03b4a81d52d00282819271edb9e8144b3 on remote branch Change-Id: I8725aafcc2827c950a9f5c945e491e65c418abef
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"