xref: /third_party/rust/crates/unicode-ident/tests/roaring/mod.rs
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/rust/crates/unicode-ident/tests/roaring/
16e652d70Sopenharmony_ciuse roaring::RoaringBitmap;
26e652d70Sopenharmony_ci
36e652d70Sopenharmony_cipub fn xid_start_bitmap() -> RoaringBitmap {
46e652d70Sopenharmony_ci    let mut bitmap = RoaringBitmap::new();
56e652d70Sopenharmony_ci    for ch in '\0'..=char::MAX {
66e652d70Sopenharmony_ci        if unicode_ident::is_xid_start(ch) {
76e652d70Sopenharmony_ci            bitmap.insert(ch as u32);
86e652d70Sopenharmony_ci        }
96e652d70Sopenharmony_ci    }
106e652d70Sopenharmony_ci    bitmap
116e652d70Sopenharmony_ci}
126e652d70Sopenharmony_ci
136e652d70Sopenharmony_cipub fn xid_continue_bitmap() -> RoaringBitmap {
146e652d70Sopenharmony_ci    let mut bitmap = RoaringBitmap::new();
156e652d70Sopenharmony_ci    for ch in '\0'..=char::MAX {
166e652d70Sopenharmony_ci        if unicode_ident::is_xid_continue(ch) {
176e652d70Sopenharmony_ci            bitmap.insert(ch as u32);
186e652d70Sopenharmony_ci        }
196e652d70Sopenharmony_ci    }
206e652d70Sopenharmony_ci    bitmap
216e652d70Sopenharmony_ci}
22

Indexes created Thu Nov 07 10:32:03 CST 2024