Make GraphemeBreakProperty available globally

This commit is contained in:
Kovid Goyal
2025-04-09 19:57:34 +05:30
parent 203e9f6c58
commit e976cf67fd
3 changed files with 21 additions and 21 deletions

View File

@@ -1177,10 +1177,10 @@ def gen_char_props() -> None:
gp('import "unsafe"')
gp(f'const MAX_UNICODE = {sys.maxunicode}')
gp(f'const UNICODE_LIMIT = {sys.maxunicode + 1}')
generate_enum(c, gp, 'GraphemeBreakProperty', *grapheme_segmentation_maps, prefix='GBP_')
generate_enum(c, gp, 'IndicConjunctBreak', *incb_map, prefix='ICB_')
cen('// UCBDeclaration {{''{')
cen(f'#define MAX_UNICODE ({sys.maxunicode}u)')
generate_enum(cen, gp, 'GraphemeBreakProperty', *grapheme_segmentation_maps, prefix='GBP_')
generate_enum(c, gp, 'IndicConjunctBreak', *incb_map, prefix='ICB_')
generate_enum(cen, gp, 'UnicodeCategory', 'Cn', *class_maps, prefix='UC_')
cen('// EndUCBDeclaration }}''}')
gp(make_bitfield('tools/wcswidth', 'CharProps', *CharProps.go_fields(), add_package=False)[1])