mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-12-01 07:24:56 -10:00
Lex the math expression parser's identifiers as Unicode identifiers Names follow the `XID_Start XID_Continue*` rule of UAX #31, the same one Rust spells, so letters from every script name a variable and combining marks extend a name: a decomposed `é` is one name rather than the constant `e` beside a stray mark. Digits of any script, lone marks, invisible formatting characters like the right-to-left override, and symbols including emoji can no longer begin a name, which also leaves `#`, `$`, `~`, and `@` free to become namespace prefixes once a host scope needs them. Rust's special case admitting a leading underscore is deliberately not adopted. Reads the character classes from unicode-ident, the table crate the proc-macro stack already builds with, rather than hand-rolling the ranges.