As the call to `symbol_is_used` does not depend on the production, it is more efficient to call it only once outside the loop over productions. I'm not sure if `rustc` is able to do this optimization on its own (it would need to know that the function is pure, which sounds difficult in general). |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| 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.