tag | dedcafc046a55225aa8c833ee4aad58614d40ef1 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue Jul 14 15:06:38 2020 -0700 |
object | 23655eb749e8cc23137aae59d2c0455bdabcdc3e |
Android R Beta 2
commit | 23655eb749e8cc23137aae59d2c0455bdabcdc3e | [log] [tgz] |
---|---|---|
author | Matthew Maurer <mmaurer@google.com> | Mon Jul 06 13:34:52 2020 -0700 |
committer | Matthew Maurer <mmaurer@google.com> | Mon Jul 06 13:34:52 2020 -0700 |
tree | 1616702c8bb9f2f323a951295d0c2a1df291f7d1 | |
parent | 7a615d9791c6dbcb070b8505692a5c8e6b1f3065 [diff] |
Support building all variants. Bug: 143217452 Test: cd external/rust; mma; atest in all TEST_MAPPING subdirs Change-Id: I44bae09c5a3de9ecbca2ecd9394a050cb4b16796
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.
You can use this package in your project by adding the following to your Cargo.toml
:
[dependencies] unicode-xid = "0.1.0"