Releases: Faveod/ruby-tree-sitter
Releases · Faveod/ruby-tree-sitter
v2.1.0
API Changes for tree-sitter 0.26 compatibility
- Updated to tree-sitter v0.26.5
- Breaking Changes in tree-sitter 0.26.x API:
ts_language_versionrenamed tots_language_abi_versionTSInputEncodingUTF16split intoTSInputEncodingUTF16LEandTSInputEncodingUTF16BE
(now using UTF16LE as default for backward compatibility)- Cancellation flag API (
ts_parser_cancellation_flag,ts_parser_set_cancellation_flag) removedParser#cancellation_flagandParser#cancellation_flag=are now no-ops for backward compatibility
- Timeout API (
ts_parser_timeout_micros,ts_parser_set_timeout_micros) removedParser#timeout_microsandParser#timeout_micros=are now no-ops for backward compatibility
- Use
TSParseOptionswithprogress_callbackfor cancellation/timeout functionality in 0.26+
TREE_SITTER_LANGUAGE_VERSIONis now 15 (was 14)TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSIONis now 13 (was 6)- Grammar files (.so) must be built against tree-sitter 0.26+ to work with this version
Bug Fixes
v2.0.0
- Removed support for ruby 3.0.
v1.12.0
- Use tree-sitter v0.24.7.
- Fix Oppen version requirement in gemspec.
v1.11.1
Disregard v1.11.0. It had 2 major issues:
- It doesn't provide a precompiled version for ruby 3.3
- It claims it works with tree-sitter 0.24.6 but it was running on 0.24.5
v1.11.0
- Use tree-sitter v0.24.6.
- Added new
rbtsexecutable to aide with writing tree-sitter query's. It will watch a source & query file then print the match & capture nodes to the screen. Seerbts --helpfor more details. - TreeSitter: better erorr message in
Node#[]. - Cross-Compile:
- build native ruby 3.4 gems.
- restore cross-compilation tests.
- TreeSitter|TreeStand: add
Node#sexpr. It's a better alternative to
tree-sitter's nativets_node_stringwhich can always be reached via
Node#to_sorNode#to_string. For instance, for the expression1 + x * 3,
ts_node_stringalways prints:(expression (sum left: (number) right: (product left: (variable) right: (number))))Node#sexpris still capable of doing the same, but if we do
node.sexpr(width: 40)we get:We can even print the named leaf nodes:(expression (sum left: (number) (+) right: (product left: (variable) (*) right: (number))))"(expression | (sum | left: | (number) | 1 (+) | + right: | (product | left: | (variable) | x (*) | * right: | (number)))) | 3
v1.10.0
- Make
TreeSitter::TreeSitterError < Exceptioninstead ofStandardErorr;
we don't want them to be handled by defaultrescue.
v1.9.1
- Add custom errors for language loading:
- LanguageLoadError - ParserNotFoundError - ParserVersionError - SymbolNotFoundError
- Add custom
QueryCreationErrorfor query creation.
v1.9.0
What's Changed
- Bump tree-sitter to 0.24.4
v1.8.0
What's Changed
- Bump tree-sitter to 0.24.3
v1.7.0
Use tree-sitter v0.23.0.