interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / vendor / unicode-ident / tests / roaring / mod.rs

23 lines · 540 bytes Raw Blame History
1#![allow(clippy::incompatible_msrv)]
2
3use roaring::RoaringBitmap;
4
5pub fn xid_start_bitmap() -> RoaringBitmap {
6 let mut bitmap = RoaringBitmap::new();
7 for ch in '\0'..=char::MAX {
8 if unicode_ident::is_xid_start(ch) {
9 bitmap.insert(ch as u32);
10 }
11 }
12 bitmap
13}
14
15pub fn xid_continue_bitmap() -> RoaringBitmap {
16 let mut bitmap = RoaringBitmap::new();
17 for ch in '\0'..=char::MAX {
18 if unicode_ident::is_xid_continue(ch) {
19 bitmap.insert(ch as u32);
20 }
21 }
22 bitmap
23}