commit | 62e6a52ea09f094de5033cbb21cc1c94f8787c68 | [log] [tgz] |
---|---|---|
author | android-build-team Robot <android-build-team-robot@google.com> | Thu Jan 21 19:05:02 2021 +0000 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Thu Jan 21 19:05:02 2021 +0000 |
tree | 6be688d61ba4df9acd1d59ad27e37c4aff141f2d | |
parent | 98360384c37558b7d59c8ac8c8bf569afdbd72a8 [diff] | |
parent | 072d4e6e82eef9637b4ef1038c32cc13170f9e37 [diff] |
Snap for 7094790 from 072d4e6e82eef9637b4ef1038c32cc13170f9e37 to tm-release Change-Id: I0e17c3d5a9a8fab0c379537d476d67691e7137ab
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.