Repository navigation
v0.25.0
Maintained fork of tree-sitter-ruby. Changes since 0.24.1:
ABI 15
src/parser.cis generated for ABI 15, which tree-sitter 0.25 and newer runtimes read (Neovim 0.11, py-tree-sitter 0.25, node-tree-sitter 0.25, the Rust crate 0.25). It carries the grammar name, version and supertypes.- Older runtimes (Neovim 0.10, tree-sitter 0.22 to 0.24) need
tree-sitter generate --abi 14from the source tarball. - The Neovim, Helix and Zed Ruby queries all compile against this grammar.
Playground
- Try the parser in the browser: https://magikdidi24.github.io/tree-sitter-ruby/
Packages
- Package names for this fork, same import names (
tree_sitter_ruby):@magikdidi24/tree-sitter-rubyon npm,tree-sitter-ruby-magikdidi24for Cargo and pip. Until they reach the registries, install from git (see the README). - The Go module path is
github.com/Magikdidi24/tree-sitter-ruby.
CI
- The inputs that once crashed, hung or slowed the scanner (heredoc floods, deep nesting, long comma lists, random bytes, every prefix of the constructs that keep scanner state) are parsed under ASan and UBSan, with a 10 s limit per file.
Performance
- Identifier characters are looked up in a table: 46 MB of real Ruby parse in 4.81 s instead of 4.88 s (user CPU).
NOTE: Download tree-sitter-ruby.tar.gz for the complete source code.