commit | bac869090af05e78c0be0f05e4111c531c66e50f | [log] [tgz] |
---|---|---|
author | Matt Lee <matthewhlee@google.com> | Tue Dec 06 21:36:39 2022 -0800 |
committer | Matt Lee <matthewhlee@google.com> | Tue Dec 06 21:36:39 2022 -0800 |
tree | 2f638b0af631bc4d9825f4ea5d5afa19e188b68a | |
parent | 5c204fd8196b885aa999b85538767764c867ad47 [diff] | |
parent | bc50b0faabc6814b6c746598a1a8beea7d742712 [diff] |
Merge t-qpr-2022-12 Change-Id: I8cb6e0e9ddf8642c82ed61aaf381629e9ddbc93d
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.