**Problem:** When encountering an invalid symbol at the beginning of the
file, the rust bindings attempt to index the character at position -1 of
the query source, which leads to an overflow and thus invalid character
index which causes a panic.
**Solution:** Bounds check the offset before performing the subtraction.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| binding_rust | ||
| binding_web | ||
| include/tree_sitter | ||
| language | ||
| src | ||
| .ccls | ||
| Cargo.toml | ||
| CMakeLists.txt | ||
| README.md | ||
| tree-sitter.pc.in | ||
Subdirectories
src- C source code for the Tree-sitter libraryinclude- C headers for the Tree-sitter librarybinding_rust- Rust bindings to the Tree-sitter librarybinding_web- JavaScript bindings to the Tree-sitter library, using WebAssembly