mix localize.gen_unicode_categories (Localize v1.5.0)

Copy Markdown View Source

Generates Localize.Number.Lexer.Categories, the Unicode general categories Localize.Number.Lexer classes characters by, from the unicode library.

The lexer settles most characters with its lexicon: digits, signs and separators. What is left it classes by Unicode's general category: a format character (Cf), a digit of another number system (Nd), a punctuation mark (Po or Pf) or a space (Zs). Those categories change with each Unicode release, so the table is generated from the unicode library, which tracks them, and checked in. Run this task when that library updates:

mix localize.gen_unicode_categories

The unicode dependency is a development one; the generated module needs nothing at runtime.