1 use roaring::RoaringBitmap; 2 xid_start_bitmap() -> RoaringBitmap3pub fn xid_start_bitmap() -> RoaringBitmap { 4 let mut bitmap = RoaringBitmap::new(); 5 for ch in '\0'..=char::MAX { 6 if unicode_ident::is_xid_start(ch) { 7 bitmap.insert(ch as u32); 8 } 9 } 10 bitmap 11 } 12 xid_continue_bitmap() -> RoaringBitmap13pub fn xid_continue_bitmap() -> RoaringBitmap { 14 let mut bitmap = RoaringBitmap::new(); 15 for ch in '\0'..=char::MAX { 16 if unicode_ident::is_xid_continue(ch) { 17 bitmap.insert(ch as u32); 18 } 19 } 20 bitmap 21 } 22