mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-14 01:16:19 -04:00
Error types are returned by value through every `Result` in the crate,
so their size is paid on the success path too. Replace owned `String`
payloads with `Box<str>` throughout, along with `Vec<String>` ->
`Box<[Box<str>]>`.
- `GenerateError`: 96 -> 56
- `ParseTableBuilderError`: 96 -> 24
- `PrepareGrammarError`: 64 -> 48
- `LoadGrammarError`: 72 -> 56
Walltime stays mostly flat, peak rss reduces marginally.
BREAKING CHANGE: public error types change for the generate crate
|
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
Tree-sitter Generate
This helper crate implements the logic for the tree-sitter generate command,
and can be used by external tools to generate a parser from a grammar file.