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