commit | 10b77f6b16b2c8bb6a48745f275b642cd37a9cb9 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Thu Jan 27 08:13:16 2022 -0800 |
committer | Linux Build Service Account <lnxbuild@localhost> | Thu Jan 27 08:13:16 2022 -0800 |
tree | f797216b35764bd1fe77fe7a569c9992241a6048 | |
parent | 918a80f2db63139a4dc3400f682c23966757006b [diff] | |
parent | 4d5633bce33b689e4cce96009499270cfd3ad778 [diff] |
Merge 4d5633bce33b689e4cce96009499270cfd3ad778 on remote branch Change-Id: I4d3e6b4fd3e3601c6420e076dc7376d8b303e342
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"