commit | 87a151133dedb6459c36d6260fa1c84290a7fe1f | [log] [tgz] |
---|---|---|
author | Zachary Pierce <zack@auxon.io> | Mon Jul 15 08:18:21 2019 -0700 |
committer | Zachary Pierce <zack@auxon.io> | Mon Jul 15 08:18:21 2019 -0700 |
tree | 02873374cd17484345cc161329f5de98b9946985 | |
parent | 488b6c41cb314e30121ff7c7f93b2fe7355ad256 [diff] |
Fix build with 'bench' feature Also correct all cargo and clippy warnings
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"