commit | 74fd093f8c736bda8059054d698804913724b609 | [log] [tgz] |
---|---|---|
author | Xin Li <delphij@google.com> | Sat Feb 20 00:24:25 2021 -0800 |
committer | Xin Li <delphij@google.com> | Sat Feb 20 00:24:25 2021 -0800 |
tree | 61cbc999afbb44a39051d64970ec4715eba50b3e | |
parent | 4c17c9fa151c41c5a494700baa04a796d58ac723 [diff] | |
parent | 1316d84b3823d59041bb980507696037ae0cafcd [diff] |
Mark ab/7061308 as merged in stage. Bug: 180401296 Merged-In: I6a3fdf1243cf62d927b122acfe2cebebd7e0d3c9 Change-Id: Id72f01f8abe02def6c003fd36b7f2c40656179f6
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.