commit | 70a3956fac7f16539576dd3863ad96186f00459e | [log] [tgz] |
---|---|---|
author | Yimin Li <ymli@google.com> | Tue Oct 06 11:50:31 2020 -0700 |
committer | Yimin Li <ymli@google.com> | Tue Oct 06 11:50:31 2020 -0700 |
tree | f797216b35764bd1fe77fe7a569c9992241a6048 | |
parent | 5a5391ab03ee8a6ec4560f2a579498c05e58857d [diff] | |
parent | 4bad6e7506c6ee07857a97ed079ddc32c912c498 [diff] |
Merge commit '4bad6e7506c6ee07857a97ed079ddc32c912c498' into HEAD Change-Id: I2e07e3c3ef2836f5adac9000cc8d46bcf65fc30e
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"