• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zbraniecki / icu4x / 13958601093

19 Mar 2025 04:17PM UTC coverage: 74.164% (-1.5%) from 75.71%
13958601093

push

github

web-flow
Clean up properties docs (#6315)

58056 of 78281 relevant lines covered (74.16%)

819371.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.29
/components/properties/src/runtime.rs
1
// This file is part of ICU4X. For terms of use, please see the file
2
// called LICENSE at the top level of the ICU4X source tree
3
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
4

5
//! 🚧 \[Experimental\] This module is experimental and currently crate-private. Let us know if you
6
//! have a use case for this!
7
//!
8
//! This module contains utilities for working with properties where the specific property in use
9
//! is not known at compile time.
10
//!
11
//! For regex engines, [`crate::sets::load_for_ecma262_unstable()`] is a convenient API for working
12
//! with properties at runtime tailored for the use case of ECMA262-compatible regex engines.
13

14
use crate::provider::*;
15
use crate::CodePointSetData;
16
#[cfg(doc)]
17
use crate::{
18
    props::{GeneralCategory, GeneralCategoryGroup, Script},
19
    script, CodePointMapData, PropertyParser,
20
};
21
use icu_provider::prelude::*;
22

23
/// This type can represent any binary Unicode property.
24
///
25
/// This is intended to be used in situations where the exact unicode property needed is
26
/// only known at runtime, for example in regex engines.
27
///
28
/// The values are intended to be identical to ICU4C's UProperty enum
29
#[non_exhaustive]
30
#[allow(missing_docs)]
31
#[allow(dead_code)]
32
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
×
33
enum BinaryProperty {
34
    Alnum = 44,
35
    Alphabetic = 0,
36
    AsciiHexDigit = 1,
37
    BidiControl = 2,
38
    BidiMirrored = 3,
39
    Blank = 45,
40
    Cased = 49,
41
    CaseIgnorable = 50,
42
    CaseSensitive = 34,
43
    ChangesWhenCasefolded = 54,
44
    ChangesWhenCasemapped = 55,
45
    ChangesWhenLowercased = 51,
46
    ChangesWhenNfkcCasefolded = 56,
47
    ChangesWhenTitlecased = 53,
48
    ChangesWhenUppercased = 52,
49
    Dash = 4,
50
    DefaultIgnorableCodePoint = 5,
51
    Deprecated = 6,
52
    Diacritic = 7,
53
    Emoji = 57,
54
    EmojiComponent = 61,
55
    EmojiModifier = 59,
56
    EmojiModifierBase = 60,
57
    EmojiPresentation = 58,
58
    ExtendedPictographic = 64,
59
    Extender = 8,
60
    FullCompositionExclusion = 9,
61
    Graph = 46,
62
    GraphemeBase = 10,
63
    GraphemeExtend = 11,
64
    GraphemeLink = 12,
65
    HexDigit = 13,
66
    Hyphen = 14,
67
    IdContinue = 15,
68
    Ideographic = 17,
69
    IdsBinaryOperator = 18,
70
    IdStart = 16,
71
    IdsTrinaryOperator = 19,
72
    JoinControl = 20,
73
    LogicalOrderException = 21,
74
    Lowercase = 22,
75
    Math = 23,
76
    NfcInert = 39,
77
    NfdInert = 37,
78
    NfkcInert = 40,
79
    NfkdInert = 38,
80
    NoncharacterCodePoint = 24,
81
    PatternSyntax = 42,
82
    PatternWhiteSpace = 43,
83
    PrependedConcatenationMark = 63,
84
    Print = 47,
85
    QuotationMark = 25,
86
    Radical = 26,
87
    RegionalIndicator = 62,
88
    SegmentStarter = 41,
89
    SentenceTerminal = 35,
90
    SoftDotted = 27,
91
    TerminalPunctuation = 28,
92
    UnifiedIdeograph = 29,
93
    Uppercase = 30,
94
    VariationSelector = 36,
95
    WhiteSpace = 31,
96
    Xdigit = 48,
97
    XidContinue = 32,
98
    XidStart = 33,
99
}
100

101
/// This type can represent any binary property over strings.
102
///
103
/// This is intended to be used in situations where the exact unicode property needed is
104
/// only known at runtime, for example in regex engines.
105
///
106
/// The values are intended to be identical to ICU4C's UProperty enum
107
#[non_exhaustive]
108
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
×
109
#[allow(dead_code)]
110
#[allow(missing_docs)]
111
enum StringBinaryProperty {
112
    BasicEmoji = 65,
113
    EmojiKeycapSequence = 66,
114
    RgiEmoji = 71,
115
    RgiEmojiFlagSequence = 68,
116
    RgiEmojiModifierSequence = 67,
117
    RgiEmojiTagSequence = 69,
118
    RgiEmojiZWJSequence = 70,
119
}
120

121
/// This type can represent any enumerated Unicode property.
122
///
123
/// This is intended to be used in situations where the exact unicode property needed is
124
/// only known at runtime, for example in regex engines.
125
///
126
/// The values are intended to be identical to ICU4C's UProperty enum
127
#[non_exhaustive]
128
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
×
129
#[allow(dead_code)]
130
#[allow(missing_docs)]
131
enum EnumeratedProperty {
132
    BidiClass = 0x1000,
133
    BidiPairedBracketType = 0x1015,
134
    Block = 0x1001,
135
    CombiningClass = 0x1002,
136
    DecompositionType = 0x1003,
137
    EastAsianWidth = 0x1004,
138
    GeneralCategory = 0x1005,
139
    GraphemeClusterBreak = 0x1012,
140
    HangulSyllableType = 0x100B,
141
    IndicPositionalCategory = 0x1016,
142
    IndicSyllabicCategory = 0x1017,
143
    JoiningGroup = 0x1006,
144
    JoiningType = 0x1007,
145
    LeadCanonicalCombiningClass = 0x1010,
146
    LineBreak = 0x1008,
147
    NFCQuickCheck = 0x100E,
148
    NFDQuickCheck = 0x100C,
149
    NFKCQuickCheck = 0x100F,
150
    NFKDQuickCheck = 0x100D,
151
    NumericType = 0x1009,
152
    Script = 0x100A,
153
    SentenceBreak = 0x1013,
154
    TrailCanonicalCombiningClass = 0x1011,
155
    VerticalOrientation = 0x1018,
156
    WordBreak = 0x1014,
157
}
158

159
/// This type can represent any Unicode mask property.
160
///
161
/// This is intended to be used in situations where the exact unicode property needed is
162
/// only known at runtime, for example in regex engines.
163
///
164
/// The values are intended to be identical to ICU4C's UProperty enum
165
#[non_exhaustive]
166
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
×
167
#[allow(dead_code)]
168
#[allow(missing_docs)]
169
enum MaskProperty {
170
    GeneralCategoryMask = 0x2000,
171
}
172

173
/// This type can represent any numeric Unicode property.
174
///
175
/// This is intended to be used in situations where the exact unicode property needed is
176
/// only known at runtime, for example in regex engines.
177
///
178
/// The values are intended to be identical to ICU4C's UProperty enum
179
#[non_exhaustive]
180
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
×
181
#[allow(dead_code)]
182
#[allow(missing_docs)]
183
enum NumericProperty {
184
    NumericValue = 0x3000,
185
}
186

187
/// This type can represent any Unicode string property.
188
///
189
/// This is intended to be used in situations where the exact unicode property needed is
190
/// only known at runtime, for example in regex engines.
191
///
192
/// The values are intended to be identical to ICU4C's UProperty enum
193
#[non_exhaustive]
194
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
×
195
#[allow(dead_code)]
196
#[allow(missing_docs)]
197
enum StringProperty {
198
    Age = 0x4000,
199
    BidiMirroringGlyph = 0x4001,
200
    BidiPairedBracket = 0x400D,
201
    CaseFolding = 0x4002,
202
    ISOComment = 0x4003,
203
    LowercaseMapping = 0x4004,
204
    Name = 0x4005,
205
    SimpleCaseFolding = 0x4006,
206
    SimpleLowercaseMapping = 0x4007,
207
    SimpleTitlecaseMapping = 0x4008,
208
    SimpleUppercaseMapping = 0x4009,
209
    TitlecaseMapping = 0x400A,
210
    Unicode1Name = 0x400B,
211
    UppercaseMapping = 0x400C,
212
}
213

214
#[non_exhaustive]
215
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
×
216
#[allow(dead_code)]
217
#[allow(missing_docs)]
218
enum MiscProperty {
219
    ScriptExtensions = 0x7000,
220
}
221

222
impl CodePointSetData {
223
    /// Returns a type capable of looking up values for a property specified as a string, as long as it is a
224
    /// [binary property listed in ECMA-262][ecma], using strict matching on the names in the spec.
225
    ///
226
    /// This handles every property required by ECMA-262 `/u` regular expressions, except for:
227
    ///
228
    /// - `Script` and `General_Category`: handle these directly using property values parsed via
229
    ///   [`PropertyParser<GeneralCategory>`] and [`PropertyParser<Script>`]
230
    ///    if necessary.
231
    /// - `Script_Extensions`: handle this directly using APIs from [`crate::script::ScriptWithExtensions`]
232
    /// - `General_Category` mask values: Handle this alongside `General_Category` using [`GeneralCategoryGroup`],
233
    ///    using property values parsed via [`PropertyParser<GeneralCategory>`] if necessary
234
    /// - `Assigned`, `All`, and `ASCII` pseudoproperties: Handle these using their equivalent sets:
235
    ///    - `Any` can be expressed as the range `[\u{0}-\u{10FFFF}]`
236
    ///    - `Assigned` can be expressed as the inverse of the set `gc=Cn` (i.e., `\P{gc=Cn}`).
237
    ///    - `ASCII` can be expressed as the range `[\u{0}-\u{7F}]`
238
    /// - `General_Category` property values can themselves be treated like properties using a shorthand in ECMA262,
239
    ///    simply create the corresponding `GeneralCategory` set.
240
    ///
241
    /// ✨ *Enabled with the `compiled_data` Cargo feature.*
242
    ///
243
    /// [📚 Help choosing a constructor](icu_provider::constructors)
244
    ///
245
    /// ```
246
    /// use icu::properties::CodePointSetData;
247
    ///
248
    /// let emoji = CodePointSetData::new_for_ecma262(b"Emoji")
249
    ///     .expect("is an ECMA-262 property");
250
    ///
251
    /// assert!(emoji.contains('🔥')); // U+1F525 FIRE
252
    /// assert!(!emoji.contains('V'));
253
    /// ```
254
    ///
255
    /// [ecma]: https://tc39.es/ecma262/#table-binary-unicode-properties
256
    #[cfg(feature = "compiled_data")]
257
    pub fn new_for_ecma262(prop: &[u8]) -> Option<crate::CodePointSetDataBorrowed<'static>> {
1✔
258
        use crate::props::*;
259
        Some(match prop {
2✔
260
            AsciiHexDigit::NAME | AsciiHexDigit::SHORT_NAME => Self::new::<AsciiHexDigit>(),
1✔
261
            Alphabetic::NAME | Alphabetic::SHORT_NAME => Self::new::<Alphabetic>(),
1✔
262
            BidiControl::NAME | BidiControl::SHORT_NAME => Self::new::<BidiControl>(),
×
263
            BidiMirrored::NAME | BidiMirrored::SHORT_NAME => Self::new::<BidiMirrored>(),
×
264
            CaseIgnorable::NAME | CaseIgnorable::SHORT_NAME => Self::new::<CaseIgnorable>(),
×
265
            #[allow(unreachable_patterns)] // no short name
266
            Cased::NAME | Cased::SHORT_NAME => Self::new::<Cased>(),
×
267
            ChangesWhenCasefolded::NAME | ChangesWhenCasefolded::SHORT_NAME => {
×
268
                Self::new::<ChangesWhenCasefolded>()
×
269
            }
270
            ChangesWhenCasemapped::NAME | ChangesWhenCasemapped::SHORT_NAME => {
271
                Self::new::<ChangesWhenCasemapped>()
×
272
            }
273
            ChangesWhenLowercased::NAME | ChangesWhenLowercased::SHORT_NAME => {
×
274
                Self::new::<ChangesWhenLowercased>()
×
275
            }
276
            ChangesWhenNfkcCasefolded::NAME | ChangesWhenNfkcCasefolded::SHORT_NAME => {
×
277
                Self::new::<ChangesWhenNfkcCasefolded>()
×
278
            }
279
            ChangesWhenTitlecased::NAME | ChangesWhenTitlecased::SHORT_NAME => {
280
                Self::new::<ChangesWhenTitlecased>()
×
281
            }
282
            ChangesWhenUppercased::NAME | ChangesWhenUppercased::SHORT_NAME => {
283
                Self::new::<ChangesWhenUppercased>()
×
284
            }
285
            #[allow(unreachable_patterns)] // no short name
286
            Dash::NAME | Dash::SHORT_NAME => Self::new::<Dash>(),
×
287
            DefaultIgnorableCodePoint::NAME | DefaultIgnorableCodePoint::SHORT_NAME => {
288
                Self::new::<DefaultIgnorableCodePoint>()
×
289
            }
290
            Deprecated::NAME | Deprecated::SHORT_NAME => Self::new::<Deprecated>(),
×
291
            Diacritic::NAME | Diacritic::SHORT_NAME => Self::new::<Diacritic>(),
×
292
            #[allow(unreachable_patterns)] // no short name
293
            Emoji::NAME | Emoji::SHORT_NAME => Self::new::<Emoji>(),
1✔
294
            EmojiComponent::NAME | EmojiComponent::SHORT_NAME => Self::new::<EmojiComponent>(),
×
295
            EmojiModifier::NAME | EmojiModifier::SHORT_NAME => Self::new::<EmojiModifier>(),
×
296
            EmojiModifierBase::NAME | EmojiModifierBase::SHORT_NAME => {
×
297
                Self::new::<EmojiModifierBase>()
×
298
            }
299
            EmojiPresentation::NAME | EmojiPresentation::SHORT_NAME => {
×
300
                Self::new::<EmojiPresentation>()
×
301
            }
302
            ExtendedPictographic::NAME | ExtendedPictographic::SHORT_NAME => {
×
303
                Self::new::<ExtendedPictographic>()
×
304
            }
305
            Extender::NAME | Extender::SHORT_NAME => Self::new::<Extender>(),
×
306
            GraphemeBase::NAME | GraphemeBase::SHORT_NAME => Self::new::<GraphemeBase>(),
×
307
            GraphemeExtend::NAME | GraphemeExtend::SHORT_NAME => Self::new::<GraphemeExtend>(),
×
308
            HexDigit::NAME | HexDigit::SHORT_NAME => Self::new::<HexDigit>(),
×
309
            IdsBinaryOperator::NAME | IdsBinaryOperator::SHORT_NAME => {
310
                Self::new::<IdsBinaryOperator>()
×
311
            }
312
            IdsTrinaryOperator::NAME | IdsTrinaryOperator::SHORT_NAME => {
×
313
                Self::new::<IdsTrinaryOperator>()
×
314
            }
315
            IdContinue::NAME | IdContinue::SHORT_NAME => Self::new::<IdContinue>(),
×
316
            IdStart::NAME | IdStart::SHORT_NAME => Self::new::<IdStart>(),
×
317
            Ideographic::NAME | Ideographic::SHORT_NAME => Self::new::<Ideographic>(),
×
318
            JoinControl::NAME | JoinControl::SHORT_NAME => Self::new::<JoinControl>(),
×
319
            LogicalOrderException::NAME | LogicalOrderException::SHORT_NAME => {
320
                Self::new::<LogicalOrderException>()
×
321
            }
322
            Lowercase::NAME | Lowercase::SHORT_NAME => Self::new::<Lowercase>(),
×
323
            #[allow(unreachable_patterns)] // no short name
324
            Math::NAME | Math::SHORT_NAME => Self::new::<Math>(),
×
325
            NoncharacterCodePoint::NAME | NoncharacterCodePoint::SHORT_NAME => {
326
                Self::new::<NoncharacterCodePoint>()
×
327
            }
328
            PatternSyntax::NAME | PatternSyntax::SHORT_NAME => Self::new::<PatternSyntax>(),
×
329
            PatternWhiteSpace::NAME | PatternWhiteSpace::SHORT_NAME => {
330
                Self::new::<PatternWhiteSpace>()
×
331
            }
332
            QuotationMark::NAME | QuotationMark::SHORT_NAME => Self::new::<QuotationMark>(),
×
333
            #[allow(unreachable_patterns)] // no short name
334
            Radical::NAME | Radical::SHORT_NAME => Self::new::<Radical>(),
×
335
            RegionalIndicator::NAME | RegionalIndicator::SHORT_NAME => {
336
                Self::new::<RegionalIndicator>()
×
337
            }
338
            SentenceTerminal::NAME | SentenceTerminal::SHORT_NAME => {
×
339
                Self::new::<SentenceTerminal>()
×
340
            }
341
            SoftDotted::NAME | SoftDotted::SHORT_NAME => Self::new::<SoftDotted>(),
×
342
            TerminalPunctuation::NAME | TerminalPunctuation::SHORT_NAME => {
343
                Self::new::<TerminalPunctuation>()
×
344
            }
345
            UnifiedIdeograph::NAME | UnifiedIdeograph::SHORT_NAME => {
346
                Self::new::<UnifiedIdeograph>()
×
347
            }
348
            Uppercase::NAME | Uppercase::SHORT_NAME => Self::new::<Uppercase>(),
×
349
            VariationSelector::NAME | VariationSelector::SHORT_NAME => {
350
                Self::new::<VariationSelector>()
×
351
            }
352
            WhiteSpace::NAME | WhiteSpace::SHORT_NAME => Self::new::<WhiteSpace>(),
×
353
            XidContinue::NAME | XidContinue::SHORT_NAME => Self::new::<XidContinue>(),
×
354
            XidStart::NAME | XidStart::SHORT_NAME => Self::new::<XidStart>(),
×
355
            // Not an ECMA-262 property
356
            _ => return None,
×
357
        })
358
    }
1✔
359

360
    icu_provider::gen_buffer_data_constructors!(
361
        (prop: &[u8]) -> result: Option<Result<Self, DataError>>,
362
        functions: [
363
            new_for_ecma262: skip,
364
            try_new_for_ecma262_with_buffer_provider,
365
            try_new_for_ecma262_unstable,
366
            Self,
367
        ]
368
    );
369

370
    #[doc = icu_provider::gen_buffer_unstable_docs!(UNSTABLE, Self::new_for_ecma262)]
371
    pub fn try_new_for_ecma262_unstable<P>(
23✔
372
        provider: &P,
373
        prop: &[u8],
374
    ) -> Option<Result<Self, DataError>>
375
    where
376
        P: ?Sized
377
            + DataProvider<PropertyBinaryAsciiHexDigitV1>
378
            + DataProvider<PropertyBinaryAlphabeticV1>
379
            + DataProvider<PropertyBinaryBidiControlV1>
380
            + DataProvider<PropertyBinaryBidiMirroredV1>
381
            + DataProvider<PropertyBinaryCaseIgnorableV1>
382
            + DataProvider<PropertyBinaryCasedV1>
383
            + DataProvider<PropertyBinaryChangesWhenCasefoldedV1>
384
            + DataProvider<PropertyBinaryChangesWhenCasemappedV1>
385
            + DataProvider<PropertyBinaryChangesWhenLowercasedV1>
386
            + DataProvider<PropertyBinaryChangesWhenNfkcCasefoldedV1>
387
            + DataProvider<PropertyBinaryChangesWhenTitlecasedV1>
388
            + DataProvider<PropertyBinaryChangesWhenUppercasedV1>
389
            + DataProvider<PropertyBinaryDashV1>
390
            + DataProvider<PropertyBinaryDefaultIgnorableCodePointV1>
391
            + DataProvider<PropertyBinaryDeprecatedV1>
392
            + DataProvider<PropertyBinaryDiacriticV1>
393
            + DataProvider<PropertyBinaryEmojiV1>
394
            + DataProvider<PropertyBinaryEmojiComponentV1>
395
            + DataProvider<PropertyBinaryEmojiModifierV1>
396
            + DataProvider<PropertyBinaryEmojiModifierBaseV1>
397
            + DataProvider<PropertyBinaryEmojiPresentationV1>
398
            + DataProvider<PropertyBinaryExtendedPictographicV1>
399
            + DataProvider<PropertyBinaryExtenderV1>
400
            + DataProvider<PropertyBinaryGraphemeBaseV1>
401
            + DataProvider<PropertyBinaryGraphemeExtendV1>
402
            + DataProvider<PropertyBinaryHexDigitV1>
403
            + DataProvider<PropertyBinaryIdsBinaryOperatorV1>
404
            + DataProvider<PropertyBinaryIdsTrinaryOperatorV1>
405
            + DataProvider<PropertyBinaryIdContinueV1>
406
            + DataProvider<PropertyBinaryIdStartV1>
407
            + DataProvider<PropertyBinaryIdeographicV1>
408
            + DataProvider<PropertyBinaryJoinControlV1>
409
            + DataProvider<PropertyBinaryLogicalOrderExceptionV1>
410
            + DataProvider<PropertyBinaryLowercaseV1>
411
            + DataProvider<PropertyBinaryMathV1>
412
            + DataProvider<PropertyBinaryNoncharacterCodePointV1>
413
            + DataProvider<PropertyBinaryPatternSyntaxV1>
414
            + DataProvider<PropertyBinaryPatternWhiteSpaceV1>
415
            + DataProvider<PropertyBinaryQuotationMarkV1>
416
            + DataProvider<PropertyBinaryRadicalV1>
417
            + DataProvider<PropertyBinaryRegionalIndicatorV1>
418
            + DataProvider<PropertyBinarySentenceTerminalV1>
419
            + DataProvider<PropertyBinarySoftDottedV1>
420
            + DataProvider<PropertyBinaryTerminalPunctuationV1>
421
            + DataProvider<PropertyBinaryUnifiedIdeographV1>
422
            + DataProvider<PropertyBinaryUppercaseV1>
423
            + DataProvider<PropertyBinaryVariationSelectorV1>
424
            + DataProvider<PropertyBinaryWhiteSpaceV1>
425
            + DataProvider<PropertyBinaryXidContinueV1>
426
            + DataProvider<PropertyBinaryXidStartV1>,
427
    {
428
        use crate::props::*;
429
        Some(match prop {
43✔
430
            AsciiHexDigit::NAME | AsciiHexDigit::SHORT_NAME => {
23✔
431
                Self::try_new_unstable::<AsciiHexDigit>(provider)
15✔
432
            }
433
            Alphabetic::NAME | Alphabetic::SHORT_NAME => {
8✔
434
                Self::try_new_unstable::<Alphabetic>(provider)
×
435
            }
436
            BidiControl::NAME | BidiControl::SHORT_NAME => {
8✔
437
                Self::try_new_unstable::<BidiControl>(provider)
×
438
            }
439
            BidiMirrored::NAME | BidiMirrored::SHORT_NAME => {
8✔
440
                Self::try_new_unstable::<BidiMirrored>(provider)
×
441
            }
442
            CaseIgnorable::NAME | CaseIgnorable::SHORT_NAME => {
8✔
443
                Self::try_new_unstable::<CaseIgnorable>(provider)
×
444
            }
445
            #[allow(unreachable_patterns)] // no short name
446
            Cased::NAME | Cased::SHORT_NAME => Self::try_new_unstable::<Cased>(provider),
×
447
            ChangesWhenCasefolded::NAME | ChangesWhenCasefolded::SHORT_NAME => {
7✔
448
                Self::try_new_unstable::<ChangesWhenCasefolded>(provider)
×
449
            }
450
            ChangesWhenCasemapped::NAME | ChangesWhenCasemapped::SHORT_NAME => {
451
                Self::try_new_unstable::<ChangesWhenCasemapped>(provider)
×
452
            }
453
            ChangesWhenLowercased::NAME | ChangesWhenLowercased::SHORT_NAME => {
7✔
454
                Self::try_new_unstable::<ChangesWhenLowercased>(provider)
×
455
            }
456
            ChangesWhenNfkcCasefolded::NAME | ChangesWhenNfkcCasefolded::SHORT_NAME => {
7✔
457
                Self::try_new_unstable::<ChangesWhenNfkcCasefolded>(provider)
×
458
            }
459
            ChangesWhenTitlecased::NAME | ChangesWhenTitlecased::SHORT_NAME => {
460
                Self::try_new_unstable::<ChangesWhenTitlecased>(provider)
×
461
            }
462
            ChangesWhenUppercased::NAME | ChangesWhenUppercased::SHORT_NAME => {
463
                Self::try_new_unstable::<ChangesWhenUppercased>(provider)
×
464
            }
465
            #[allow(unreachable_patterns)] // no short name
466
            Dash::NAME | Dash::SHORT_NAME => Self::try_new_unstable::<Dash>(provider),
×
467
            DefaultIgnorableCodePoint::NAME | DefaultIgnorableCodePoint::SHORT_NAME => {
468
                Self::try_new_unstable::<DefaultIgnorableCodePoint>(provider)
×
469
            }
470
            Deprecated::NAME | Deprecated::SHORT_NAME => {
471
                Self::try_new_unstable::<Deprecated>(provider)
×
472
            }
473
            Diacritic::NAME | Diacritic::SHORT_NAME => {
7✔
474
                Self::try_new_unstable::<Diacritic>(provider)
×
475
            }
476
            #[allow(unreachable_patterns)] // no short name
477
            Emoji::NAME | Emoji::SHORT_NAME => Self::try_new_unstable::<Emoji>(provider),
×
478
            EmojiComponent::NAME | EmojiComponent::SHORT_NAME => {
479
                Self::try_new_unstable::<EmojiComponent>(provider)
×
480
            }
481
            EmojiModifier::NAME | EmojiModifier::SHORT_NAME => {
482
                Self::try_new_unstable::<EmojiModifier>(provider)
×
483
            }
484
            EmojiModifierBase::NAME | EmojiModifierBase::SHORT_NAME => {
1✔
485
                Self::try_new_unstable::<EmojiModifierBase>(provider)
×
486
            }
487
            EmojiPresentation::NAME | EmojiPresentation::SHORT_NAME => {
1✔
488
                Self::try_new_unstable::<EmojiPresentation>(provider)
×
489
            }
490
            ExtendedPictographic::NAME | ExtendedPictographic::SHORT_NAME => {
1✔
491
                Self::try_new_unstable::<ExtendedPictographic>(provider)
×
492
            }
493
            Extender::NAME | Extender::SHORT_NAME => Self::try_new_unstable::<Extender>(provider),
1✔
494
            GraphemeBase::NAME | GraphemeBase::SHORT_NAME => {
495
                Self::try_new_unstable::<GraphemeBase>(provider)
×
496
            }
497
            GraphemeExtend::NAME | GraphemeExtend::SHORT_NAME => {
498
                Self::try_new_unstable::<GraphemeExtend>(provider)
×
499
            }
500
            HexDigit::NAME | HexDigit::SHORT_NAME => Self::try_new_unstable::<HexDigit>(provider),
×
501
            IdsBinaryOperator::NAME | IdsBinaryOperator::SHORT_NAME => {
502
                Self::try_new_unstable::<IdsBinaryOperator>(provider)
×
503
            }
504
            IdsTrinaryOperator::NAME | IdsTrinaryOperator::SHORT_NAME => {
1✔
505
                Self::try_new_unstable::<IdsTrinaryOperator>(provider)
×
506
            }
507
            IdContinue::NAME | IdContinue::SHORT_NAME => {
1✔
508
                Self::try_new_unstable::<IdContinue>(provider)
×
509
            }
510
            IdStart::NAME | IdStart::SHORT_NAME => Self::try_new_unstable::<IdStart>(provider),
×
511
            Ideographic::NAME | Ideographic::SHORT_NAME => {
512
                Self::try_new_unstable::<Ideographic>(provider)
×
513
            }
514
            JoinControl::NAME | JoinControl::SHORT_NAME => {
515
                Self::try_new_unstable::<JoinControl>(provider)
×
516
            }
517
            LogicalOrderException::NAME | LogicalOrderException::SHORT_NAME => {
518
                Self::try_new_unstable::<LogicalOrderException>(provider)
×
519
            }
520
            Lowercase::NAME | Lowercase::SHORT_NAME => {
521
                Self::try_new_unstable::<Lowercase>(provider)
6✔
522
            }
523
            #[allow(unreachable_patterns)] // no short name
524
            Math::NAME | Math::SHORT_NAME => Self::try_new_unstable::<Math>(provider),
×
525
            NoncharacterCodePoint::NAME | NoncharacterCodePoint::SHORT_NAME => {
526
                Self::try_new_unstable::<NoncharacterCodePoint>(provider)
×
527
            }
528
            PatternSyntax::NAME | PatternSyntax::SHORT_NAME => {
529
                Self::try_new_unstable::<PatternSyntax>(provider)
×
530
            }
531
            PatternWhiteSpace::NAME | PatternWhiteSpace::SHORT_NAME => {
532
                Self::try_new_unstable::<PatternWhiteSpace>(provider)
×
533
            }
534
            QuotationMark::NAME | QuotationMark::SHORT_NAME => {
535
                Self::try_new_unstable::<QuotationMark>(provider)
×
536
            }
537
            #[allow(unreachable_patterns)] // no short name
538
            Radical::NAME | Radical::SHORT_NAME => Self::try_new_unstable::<Radical>(provider),
×
539
            RegionalIndicator::NAME | RegionalIndicator::SHORT_NAME => {
540
                Self::try_new_unstable::<RegionalIndicator>(provider)
×
541
            }
542
            SentenceTerminal::NAME | SentenceTerminal::SHORT_NAME => {
1✔
543
                Self::try_new_unstable::<SentenceTerminal>(provider)
×
544
            }
545
            SoftDotted::NAME | SoftDotted::SHORT_NAME => {
546
                Self::try_new_unstable::<SoftDotted>(provider)
×
547
            }
548
            TerminalPunctuation::NAME | TerminalPunctuation::SHORT_NAME => {
549
                Self::try_new_unstable::<TerminalPunctuation>(provider)
×
550
            }
551
            UnifiedIdeograph::NAME | UnifiedIdeograph::SHORT_NAME => {
552
                Self::try_new_unstable::<UnifiedIdeograph>(provider)
×
553
            }
554
            Uppercase::NAME | Uppercase::SHORT_NAME => {
555
                Self::try_new_unstable::<Uppercase>(provider)
×
556
            }
557
            VariationSelector::NAME | VariationSelector::SHORT_NAME => {
558
                Self::try_new_unstable::<VariationSelector>(provider)
×
559
            }
560
            WhiteSpace::NAME | WhiteSpace::SHORT_NAME => {
561
                Self::try_new_unstable::<WhiteSpace>(provider)
×
562
            }
563
            XidContinue::NAME | XidContinue::SHORT_NAME => {
564
                Self::try_new_unstable::<XidContinue>(provider)
×
565
            }
566
            XidStart::NAME | XidStart::SHORT_NAME => Self::try_new_unstable::<XidStart>(provider),
×
567
            // Not an ECMA-262 property
568
            _ => return None,
2✔
569
        })
570
    }
23✔
571
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc