mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
- Refactors the tokenizer to be lazy: It does not emit pre-parsed function tokens, but instead allows it's mode to be changed. The modes are tracked on a stack to allow nested compute/typesetting (pop/push). - Introduces delimited groups into the parser, which make it easy to parse delimited expressions without handling the delimiters in the parsing code for the group's content. A group is started with `start_group`. When reaching the group's end (matching delimiter) the eat and peek methods will simply return `None` instead of the delimiter, stopping the content parser and bubbling up the call stack until `end_group` is called to clear up the situation.
Description
Languages
Rust
85.5%
Typst
13.9%
TypeScript
0.3%
HTML
0.2%
Nix
0.1%