commit | 8d034406e06685ce777ea747c641b813f47900f8 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Wed May 11 05:13:02 2022 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Wed May 11 05:13:02 2022 +0000 |
tree | 2f638b0af631bc4d9825f4ea5d5afa19e188b68a | |
parent | 788b1177692dad380cf13694e7bf948d3f451423 [diff] | |
parent | bd8e405fbb6cfa58acb6dfcaaa72ca7e1f44b594 [diff] |
Snap for 8570526 from bd8e405fbb6cfa58acb6dfcaaa72ca7e1f44b594 to mainline-networking-release Change-Id: Idda2f8e7663ae2e41f9b0e4ccd61361c59571771
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.