@@ -190,70 +190,72 @@ def emit_general_category_module(f):
190
190
f .write ("""
191
191
192
192
#[derive(Copy, Clone, Hash, Eq, PartialEq, Ord, PartialOrd, Debug)]
193
+ /// The most general classification of a character.
193
194
pub enum GeneralCategory {
194
- /// an uppercase letter
195
+ /// `Lu`, an uppercase letter
195
196
LetterUppercase,
196
- /// a lowercase letter
197
+ /// `Ll`, a lowercase letter
197
198
LetterLowercase,
198
- /// a digraphic character, with first part uppercase
199
+ /// `Lt`, a digraphic character, with first part uppercase
199
200
LetterTitlecase,
200
- /// a modifier letter
201
+ /// `Lm`, a modifier letter
201
202
LetterModifier,
202
- /// other letters, including syllables and ideographs
203
+ /// `Lo`, other letters, including syllables and ideographs
203
204
LetterOther,
204
- /// a nonspacing combining mark (zero advance width)
205
+ /// `Mn`, a nonspacing combining mark (zero advance width)
205
206
MarkNonspacing,
206
- /// a spacing combining mark (positive advance width)
207
+ /// `Mc`, a spacing combining mark (positive advance width)
207
208
MarkSpacing,
208
- /// an enclosing combining mark
209
+ /// `Me`, an enclosing combining mark
209
210
MarkEnclosing,
210
- /// a decimal digit
211
+ /// `Nd`, a decimal digit
211
212
NumberDecimal,
212
- /// a letterlike numeric character
213
+ /// `Nl`, a letterlike numeric character
213
214
NumberLetter,
214
- /// a numeric character of other type
215
+ /// `No`, a numeric character of other type
215
216
NumberOther,
216
- /// a connecting punctuation mark, like a tie
217
+ /// `Pc`, a connecting punctuation mark, like a tie
217
218
PunctuationConnector,
218
- /// a dash or hyphen punctuation mark
219
+ /// `Pd`, a dash or hyphen punctuation mark
219
220
PunctuationDash,
220
- /// an opening punctuation mark (of a pair)
221
+ /// `Ps`, an opening punctuation mark (of a pair)
221
222
PunctuationOpen,
222
- /// a closing punctuation mark (of a pair)
223
+ /// `Pe`, a closing punctuation mark (of a pair)
223
224
PunctuationClose,
224
- /// an initial quotation mark
225
+ /// `Pi`, an initial quotation mark
225
226
PunctuationInitial,
226
- /// a final quotation mark
227
+ /// `Pf`, a final quotation mark
227
228
PunctuationFinal,
228
- /// a punctuation mark of other type
229
+ /// `Po`, a punctuation mark of other type
229
230
PunctuationOther,
230
- /// a symbol of mathematical use
231
+ /// `Sm`, a symbol of mathematical use
231
232
SymbolMath,
232
- /// a currency sign
233
+ /// `Sc`, a currency sign
233
234
SymbolCurrency,
234
- /// a non-letterlike modifier symbol
235
+ /// `Sk`, a non-letterlike modifier symbol
235
236
SymbolModifier,
236
- /// a symbol of other type
237
+ /// `So`, a symbol of other type
237
238
SymbolOther,
238
- /// a space character (of various non-zero widths)
239
+ /// `Zs`, a space character (of various non-zero widths)
239
240
SeparatorSpace,
240
- /// U+2028 LINE SEPARATOR only
241
+ /// `Zl`, U+2028 LINE SEPARATOR only
241
242
SeparatorLine,
242
- /// U+2029 PARAGRAPH SEPARATOR only
243
+ /// `Zp`, U+2029 PARAGRAPH SEPARATOR only
243
244
SeparatorParagraph,
244
- /// a C0 or C1 control code
245
+ /// `Cc`, a C0 or C1 control code
245
246
OtherControl,
246
- /// a format control character
247
+ /// `Cf`, a format control character
247
248
OtherFormat,
248
- /// a surrogate code point
249
+ /// `Cs`, a surrogate code point
249
250
OtherSurrogate,
250
- /// a private-use character
251
+ /// `Co`, a private-use character
251
252
OtherPrivateUse,
252
- /// a reserved unassigned code point or a noncharacter
253
+ /// `Cn`, a reserved unassigned code point or a noncharacter
253
254
OtherUnassigned,
254
255
}
255
256
256
257
#[derive(Copy, Clone, Hash, Eq, PartialEq, Ord, PartialOrd, Debug)]
258
+ /// Groupings of the most general classification of a character.
257
259
pub enum GeneralCategoryGroup {
258
260
/// Lu | Ll | Lt | Lm | Lo
259
261
Letter,
@@ -379,15 +381,25 @@ def emit_emoji_module(f):
379
381
380
382
#[derive(Copy, Clone, Hash, Eq, PartialEq, Ord, PartialOrd, Debug)]
381
383
#[non_exhaustive]
384
+ /// The emoji character properties of a character.
382
385
pub enum EmojiStatus {
386
+ /// `Emoji=NO`, `Emoji_Component=NO`
383
387
NonEmoji,
388
+ /// `Emoji=NO`, `Emoji_Component=YES`
384
389
NonEmojiButEmojiComponent,
390
+ /// `Emoji=YES`, `Emoji_Component=NO`;`Emoji_Presentation=YES`
385
391
EmojiPresentation,
392
+ /// `Emoji=YES`, `Emoji_Component=NO`;`Emoji_Modifier_Base=YES`
386
393
EmojiModifierBase,
394
+ /// `Emoji=YES`, `Emoji_Component=NO`;`Emoji_Presentation=YES`, `Emoji_Modifier_Base=YES`
387
395
EmojiPresentationAndModifierBase,
396
+ /// `Emoji=YES`, `Emoji_Component=NO`
388
397
EmojiOther,
398
+ /// `Emoji=YES`, `Emoji_Component=YES`;`Emoji_Presentation=YES`
389
399
EmojiPresentationAndEmojiComponent,
400
+ /// `Emoji=YES`, `Emoji_Component=YES`;`Emoji_Presentation=YES`, `Emoji_Modifier=YES`
390
401
EmojiPresentationAndModifierAndEmojiComponent,
402
+ /// `Emoji=YES`, `Emoji_Component=YES`
391
403
EmojiOtherAndEmojiComponent,
392
404
}
393
405
#[inline]
0 commit comments