commit | bc2624c64a9dcd45ae18170bb1fa5fde49fd53bb | [log] [tgz] |
---|---|---|
author | Eric Arseneau <earseneau@google.com> | Thu Dec 10 15:41:31 2020 -0800 |
committer | Eric Arseneau <earseneau@google.com> | Thu Dec 10 15:41:31 2020 -0800 |
tree | f797216b35764bd1fe77fe7a569c9992241a6048 | |
parent | d2524570f0ce9ad1135843e623fea9f8197a03c7 [diff] | |
parent | 4bad6e7506c6ee07857a97ed079ddc32c912c498 [diff] |
Merge spl-2020-12-05 Change-Id: Ie5e501b7e1c5a92ff0138f0ba63bd781c33e35ba
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"