commit | 16f78c692753151c1849545d573599a6a08d6306 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Thu Feb 04 02:28:35 2021 -0800 |
committer | Linux Build Service Account <lnxbuild@localhost> | Thu Feb 04 02:28:35 2021 -0800 |
tree | f797216b35764bd1fe77fe7a569c9992241a6048 | |
parent | 85363e7057582c3c34a252a28f3b5cf9bd02a6a3 [diff] | |
parent | d60ba9b03b4a81d52d00282819271edb9e8144b3 [diff] |
Merge d60ba9b03b4a81d52d00282819271edb9e8144b3 on remote branch Change-Id: I1c33b860eebacf7ee7f3e49311f9f1eafef32548
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"