From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- third_party/rust/unicode-ident/tests/roaring/mod.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 third_party/rust/unicode-ident/tests/roaring/mod.rs (limited to 'third_party/rust/unicode-ident/tests/roaring/mod.rs') diff --git a/third_party/rust/unicode-ident/tests/roaring/mod.rs b/third_party/rust/unicode-ident/tests/roaring/mod.rs new file mode 100644 index 0000000000..3f558fffe8 --- /dev/null +++ b/third_party/rust/unicode-ident/tests/roaring/mod.rs @@ -0,0 +1,21 @@ +use roaring::RoaringBitmap; + +pub fn xid_start_bitmap() -> RoaringBitmap { + let mut bitmap = RoaringBitmap::new(); + for ch in '\0'..=char::MAX { + if unicode_ident::is_xid_start(ch) { + bitmap.insert(ch as u32); + } + } + bitmap +} + +pub fn xid_continue_bitmap() -> RoaringBitmap { + let mut bitmap = RoaringBitmap::new(); + for ch in '\0'..=char::MAX { + if unicode_ident::is_xid_continue(ch) { + bitmap.insert(ch as u32); + } + } + bitmap +} -- cgit v1.2.3