commit | 7636bbbbe67f23ac268e402c2adb6d4d3ca9531d | [log] [tgz] |
---|---|---|
author | Chih-hung Hsieh <chh@google.com> | Wed Dec 04 09:40:28 2019 -0800 |
committer | android-build-merger <android-build-merger@google.com> | Wed Dec 04 09:40:28 2019 -0800 |
tree | c522aecaa562186be0acbc65da2acb2eb932e3ec | |
parent | 6767cb6c7411395ce736b966f23d4e24a230b779 [diff] | |
parent | 9d7cf926efeecd1ab96863471428d0373133bf49 [diff] |
Merge "Add auto_gen_config and TEST_MAPPING." am: 9d7cf926ef Change-Id: I9ef7cd761f65c3ce74194df37262a054f22f3454
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"