|
1 | 1 | ///! This file is generated by `./x run src/tools/unicode-table-generator`; do not edit manually!
|
2 | 2 | // Alphabetic : 1727 bytes, 142759 codepoints in 757 ranges (U+000041 - U+0323B0) using skiplist
|
3 | 3 | // Case_Ignorable : 1053 bytes, 2749 codepoints in 452 ranges (U+000027 - U+0E01F0) using skiplist
|
4 |
| -// Cased : 407 bytes, 4578 codepoints in 159 ranges (U+000041 - U+01F18A) using skiplist |
5 |
| -// Cc : 9 bytes, 65 codepoints in 2 ranges (U+000000 - U+0000A0) using skiplist |
6 | 4 | // Grapheme_Extend : 887 bytes, 2193 codepoints in 375 ranges (U+000300 - U+0E01F0) using skiplist
|
7 | 5 | // Lowercase : 935 bytes, 2569 codepoints in 675 ranges (U+000061 - U+01E944) using bitset
|
| 6 | +// Lt : 33 bytes, 31 codepoints in 10 ranges (U+0001C5 - U+001FFD) using skiplist |
8 | 7 | // N : 457 bytes, 1911 codepoints in 144 ranges (U+000030 - U+01FBFA) using skiplist
|
9 | 8 | // Uppercase : 799 bytes, 1978 codepoints in 656 ranges (U+000041 - U+01F18A) using bitset
|
10 | 9 | // White_Space : 256 bytes, 25 codepoints in 10 ranges (U+000009 - U+003001) using cascading
|
11 | 10 | // to_lower : 11484 bytes
|
12 | 11 | // to_upper : 13432 bytes
|
13 |
| -// Total : 31446 bytes |
| 12 | +// Total : 31063 bytes |
14 | 13 |
|
15 | 14 | #[inline(always)]
|
16 | 15 | const fn bitset_search<
|
@@ -324,52 +323,6 @@ pub mod case_ignorable {
|
324 | 323 | }
|
325 | 324 | }
|
326 | 325 |
|
327 |
| -#[rustfmt::skip] |
328 |
| -pub mod cased { |
329 |
| - use super::ShortOffsetRunHeader; |
330 |
| - |
331 |
| - static SHORT_OFFSET_RUNS: [ShortOffsetRunHeader; 22] = [ |
332 |
| - ShortOffsetRunHeader::new(0, 4256), ShortOffsetRunHeader::new(55, 5024), |
333 |
| - ShortOffsetRunHeader::new(65, 7296), ShortOffsetRunHeader::new(69, 7958), |
334 |
| - ShortOffsetRunHeader::new(78, 9398), ShortOffsetRunHeader::new(153, 11264), |
335 |
| - ShortOffsetRunHeader::new(155, 42560), ShortOffsetRunHeader::new(167, 43824), |
336 |
| - ShortOffsetRunHeader::new(187, 64256), ShortOffsetRunHeader::new(193, 65313), |
337 |
| - ShortOffsetRunHeader::new(197, 66560), ShortOffsetRunHeader::new(201, 67456), |
338 |
| - ShortOffsetRunHeader::new(223, 68736), ShortOffsetRunHeader::new(231, 71840), |
339 |
| - ShortOffsetRunHeader::new(239, 93760), ShortOffsetRunHeader::new(241, 119808), |
340 |
| - ShortOffsetRunHeader::new(243, 120486), ShortOffsetRunHeader::new(280, 122624), |
341 |
| - ShortOffsetRunHeader::new(303, 122928), ShortOffsetRunHeader::new(309, 125184), |
342 |
| - ShortOffsetRunHeader::new(311, 127280), ShortOffsetRunHeader::new(313, 1241482), |
343 |
| - ]; |
344 |
| - static OFFSETS: [u8; 319] = [ |
345 |
| - 65, 26, 6, 26, 47, 1, 10, 1, 4, 1, 5, 23, 1, 31, 1, 195, 1, 4, 4, 208, 1, 36, 7, 2, 30, 5, |
346 |
| - 96, 1, 42, 4, 2, 2, 2, 4, 1, 1, 6, 1, 1, 3, 1, 1, 1, 20, 1, 83, 1, 139, 8, 166, 1, 38, 9, |
347 |
| - 41, 0, 38, 1, 1, 5, 1, 2, 43, 1, 4, 0, 86, 2, 6, 0, 11, 5, 43, 2, 3, 64, 192, 64, 0, 2, 6, |
348 |
| - 2, 38, 2, 6, 2, 8, 1, 1, 1, 1, 1, 1, 1, 31, 2, 53, 1, 7, 1, 1, 3, 3, 1, 7, 3, 4, 2, 6, 4, |
349 |
| - 13, 5, 3, 1, 7, 116, 1, 13, 1, 16, 13, 101, 1, 4, 1, 2, 10, 1, 1, 3, 5, 6, 1, 1, 1, 1, 1, 1, |
350 |
| - 4, 1, 6, 4, 1, 2, 4, 5, 5, 4, 1, 17, 32, 3, 2, 0, 52, 0, 229, 6, 4, 3, 2, 12, 38, 1, 1, 5, |
351 |
| - 1, 0, 46, 18, 30, 132, 102, 3, 4, 1, 62, 2, 2, 1, 1, 1, 8, 21, 5, 1, 3, 0, 43, 1, 14, 6, 80, |
352 |
| - 0, 7, 12, 5, 0, 26, 6, 26, 0, 80, 96, 36, 4, 36, 116, 11, 1, 15, 1, 7, 1, 2, 1, 11, 1, 15, |
353 |
| - 1, 7, 1, 2, 0, 1, 2, 3, 1, 42, 1, 9, 0, 51, 13, 51, 93, 22, 10, 22, 0, 64, 0, 64, 0, 85, 1, |
354 |
| - 71, 1, 2, 2, 1, 2, 2, 2, 4, 1, 12, 1, 1, 1, 7, 1, 65, 1, 4, 2, 8, 1, 7, 1, 28, 1, 4, 1, 5, |
355 |
| - 1, 1, 3, 7, 1, 0, 2, 25, 1, 25, 1, 31, 1, 25, 1, 31, 1, 25, 1, 31, 1, 25, 1, 31, 1, 25, 1, |
356 |
| - 8, 0, 10, 1, 20, 6, 6, 0, 62, 0, 68, 0, 26, 6, 26, 6, 26, 0, |
357 |
| - ]; |
358 |
| - pub fn lookup(c: char) -> bool { |
359 |
| - const { |
360 |
| - assert!(SHORT_OFFSET_RUNS.last().unwrap().0 > char::MAX as u32); |
361 |
| - let mut i = 0; |
362 |
| - while i < SHORT_OFFSET_RUNS.len() { |
363 |
| - assert!(SHORT_OFFSET_RUNS[i].start_index() < OFFSETS.len()); |
364 |
| - i += 1; |
365 |
| - } |
366 |
| - } |
367 |
| - // SAFETY: We just ensured the last element of `SHORT_OFFSET_RUNS` is greater than `std::char::MAX` |
368 |
| - // and the start indices of all elements in `SHORT_OFFSET_RUNS` are smaller than `OFFSETS.len()`. |
369 |
| - unsafe { super::skip_search(c, &SHORT_OFFSET_RUNS, &OFFSETS) } |
370 |
| - } |
371 |
| -} |
372 |
| - |
373 | 326 | #[rustfmt::skip]
|
374 | 327 | pub mod grapheme_extend {
|
375 | 328 | use super::ShortOffsetRunHeader;
|
@@ -549,6 +502,38 @@ pub mod lowercase {
|
549 | 502 | }
|
550 | 503 | }
|
551 | 504 |
|
| 505 | +#[rustfmt::skip] |
| 506 | +pub mod lt { |
| 507 | + use super::ShortOffsetRunHeader; |
| 508 | + |
| 509 | + static SHORT_OFFSET_RUNS: [ShortOffsetRunHeader; 3] = [ |
| 510 | + ShortOffsetRunHeader::new(0, 453), ShortOffsetRunHeader::new(1, 8072), |
| 511 | + ShortOffsetRunHeader::new(9, 1122301), |
| 512 | + ]; |
| 513 | + static OFFSETS: [u8; 21] = [ |
| 514 | + 0, 1, 2, 1, 2, 1, 38, 1, 0, 8, 8, 8, 8, 8, 12, 1, 15, 1, 47, 1, 0, |
| 515 | + ]; |
| 516 | + #[inline] |
| 517 | + pub fn lookup(c: char) -> bool { |
| 518 | + (c as u32) >= 0x1c5 && lookup_slow(c) |
| 519 | + } |
| 520 | + |
| 521 | + #[inline(never)] |
| 522 | + fn lookup_slow(c: char) -> bool { |
| 523 | + const { |
| 524 | + assert!(SHORT_OFFSET_RUNS.last().unwrap().0 > char::MAX as u32); |
| 525 | + let mut i = 0; |
| 526 | + while i < SHORT_OFFSET_RUNS.len() { |
| 527 | + assert!(SHORT_OFFSET_RUNS[i].start_index() < OFFSETS.len()); |
| 528 | + i += 1; |
| 529 | + } |
| 530 | + } |
| 531 | + // SAFETY: We just ensured the last element of `SHORT_OFFSET_RUNS` is greater than `std::char::MAX` |
| 532 | + // and the start indices of all elements in `SHORT_OFFSET_RUNS` are smaller than `OFFSETS.len()`. |
| 533 | + unsafe { super::skip_search(c, &SHORT_OFFSET_RUNS, &OFFSETS) } |
| 534 | + } |
| 535 | +} |
| 536 | + |
552 | 537 | #[rustfmt::skip]
|
553 | 538 | pub mod n {
|
554 | 539 | use super::ShortOffsetRunHeader;
|
|
0 commit comments