mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-12-02 00:01:59 -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.
23 lines
500 B
TOML
23 lines
500 B
TOML
[package]
|
|
name = "math-parser"
|
|
description = "Parser for Graphite style mathematics expressions"
|
|
version.workspace = true
|
|
license.workspace = true
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
publish.workspace = true
|
|
|
|
[dependencies]
|
|
thiserror = "2.0"
|
|
num-complex = "0.4"
|
|
unicode-ident = "1.0"
|
|
chumsky = { version = "0.10", default-features = false, features = ["std"] }
|
|
|
|
[dev-dependencies]
|
|
criterion = { workspace = true }
|
|
|
|
[[bench]]
|
|
name = "bench"
|
|
harness = false
|