commit | 837878dcb82a334dc28ea065749f36834e1c1608 | [log] [tgz] |
---|---|---|
author | Haamed Gheibi <haamed@google.com> | Thu Sep 23 17:39:40 2021 +0000 |
committer | Haamed Gheibi <haamed@google.com> | Thu Sep 23 17:39:40 2021 +0000 |
tree | 0d25cea036e87487b61cba91efc0d972ba234d12 | |
parent | 83571030a937126fdb616ec19fd96b8eabf2f53e [diff] | |
parent | 345aab87c95e851de0fc5afc79b9e03d73f79873 [diff] |
Merge TP1A.210812.002 Bug: 198367246 Change-Id: I59602443eb8fa425c68a6f89c7b64654eb8eb5c3
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.