tree_haver 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +4 -2
- data/CHANGELOG.md +28 -1
- data/README.md +1 -1
- data/lib/tree_haver/backends/ffi.rb +15 -1
- data/lib/tree_haver/node.rb +0 -1
- data/lib/tree_haver/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81ceda8836df5d3f2c45886a8c056f1acbc65b8f221990f6e8e2cf7cf6c5334d
|
|
4
|
+
data.tar.gz: 79e8c7110c85383f368ebd975ba435a3939c27efef30e9c955afb485d2054c14
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd8d8dc376fc4dad1acfd9a9ca8463311a07256af6c9ac27dd618e05bb5621e97d37f7d425cd5d4a5d40e6e2e918e8f71dce04562fdaef91c5f54196abd1e794
|
|
7
|
+
data.tar.gz: '00197875637b14a40ecb252f5ea13a85bd03743108258d8c2779c9766b58f10b8d2b90d0c38de9502bb48eceecbd8f29df13caf062bbd0e36858fb0f2563f82a'
|
checksums.yaml.gz.sig
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
�
|
|
1
|
+
jH�)_���Bxɶ,F�Z�B
|
|
2
|
+
���*Wo���_W���l'؞�s�;�I+�vd�(��~�L0qE�֠��1�W��攇�I��6��7M_�����?7��*����k���n���֠�,��������.������a(f��"���9��[�D]z(�r|���R�D�Bֻ*ħcO
|
|
3
|
+
�{myl�Jj�\�nAqN�M���<G(N��
|
|
4
|
+
�H�x��� �]xq�^�P�
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,31 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
+
## [4.0.2] - 2026-01-08
|
|
34
|
+
|
|
35
|
+
- TAG: [v4.0.2][4.0.2t]
|
|
36
|
+
- COVERAGE: 95.27% -- 2033/2134 lines in 28 files
|
|
37
|
+
- BRANCH COVERAGE: 84.07% -- 802/954 branches in 28 files
|
|
38
|
+
- 95.49% documented
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- **FFI Backend**: Implemented `missing?` method on `TreeHaver::Backends::FFI::Node`
|
|
43
|
+
- Added `ts_node_is_missing` FFI function attachment
|
|
44
|
+
- This method was missing entirely, causing `NoMethodError` when checking for MISSING nodes
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- **TreeHaver::Node**: Removed defensive `respond_to?` checks from `has_error?` and `missing?` methods
|
|
49
|
+
- All tree-sitter backends (MRI, Rust, FFI, Java) must implement these methods on their inner nodes
|
|
50
|
+
- This enforces proper backend API compliance rather than silently masking missing implementations
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
|
|
54
|
+
- **FFI Backend**: Added explicit boolean conversion (`!!`) to `has_error?` return value
|
|
55
|
+
- FFI `:bool` return type may behave inconsistently across Ruby versions and platforms
|
|
56
|
+
- Ensures `has_error?` always returns `true` or `false`, not truthy/falsy values
|
|
57
|
+
|
|
33
58
|
## [4.0.1] - 2026-01-08
|
|
34
59
|
|
|
35
60
|
- TAG: [v4.0.1][4.0.1t]
|
|
@@ -965,7 +990,9 @@ Despite the major version bump to 3.0.0 (following semver due to the breaking `L
|
|
|
965
990
|
|
|
966
991
|
- Initial release
|
|
967
992
|
|
|
968
|
-
[Unreleased]: https://github.com/kettle-rb/tree_haver/compare/v4.0.
|
|
993
|
+
[Unreleased]: https://github.com/kettle-rb/tree_haver/compare/v4.0.2...HEAD
|
|
994
|
+
[4.0.2]: https://github.com/kettle-rb/tree_haver/compare/v4.0.1...v4.0.2
|
|
995
|
+
[4.0.2t]: https://github.com/kettle-rb/tree_haver/releases/tag/v4.0.2
|
|
969
996
|
[4.0.1]: https://github.com/kettle-rb/tree_haver/compare/v4.0.0...v4.0.1
|
|
970
997
|
[4.0.1t]: https://github.com/kettle-rb/tree_haver/releases/tag/v4.0.1
|
|
971
998
|
[4.0.0]: https://github.com/kettle-rb/tree_haver/compare/v3.2.6...v4.0.0
|
data/README.md
CHANGED
|
@@ -2182,7 +2182,7 @@ Thanks for RTFM. ☺️
|
|
|
2182
2182
|
[📌gitmoji]: https://gitmoji.dev
|
|
2183
2183
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
2184
2184
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
2185
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-2.
|
|
2185
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-2.134-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
2186
2186
|
[🔐security]: SECURITY.md
|
|
2187
2187
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
2188
2188
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
|
@@ -273,6 +273,7 @@ module TreeHaver
|
|
|
273
273
|
attach_function(:ts_node_end_point, [:ts_node], :ts_point)
|
|
274
274
|
attach_function(:ts_node_is_null, [:ts_node], :bool)
|
|
275
275
|
attach_function(:ts_node_is_named, [:ts_node], :bool)
|
|
276
|
+
attach_function(:ts_node_is_missing, [:ts_node], :bool)
|
|
276
277
|
attach_function(:ts_node_has_error, [:ts_node], :bool)
|
|
277
278
|
|
|
278
279
|
# Only mark as fully loaded after all attach_function calls succeed
|
|
@@ -701,7 +702,20 @@ module TreeHaver
|
|
|
701
702
|
#
|
|
702
703
|
# @return [Boolean] true if node subtree contains errors
|
|
703
704
|
def has_error?
|
|
704
|
-
|
|
705
|
+
# Explicit boolean conversion ensures consistent behavior across Ruby versions
|
|
706
|
+
# FFI :bool return type may behave differently on some platforms
|
|
707
|
+
!!Native.ts_node_has_error(@val)
|
|
708
|
+
end
|
|
709
|
+
|
|
710
|
+
# Check if this is a MISSING node
|
|
711
|
+
#
|
|
712
|
+
# A MISSING node represents a token that was expected by the grammar
|
|
713
|
+
# but was not found in the source. Tree-sitter inserts MISSING nodes
|
|
714
|
+
# to allow parsing to continue despite syntax errors.
|
|
715
|
+
#
|
|
716
|
+
# @return [Boolean] true if this is a MISSING node
|
|
717
|
+
def missing?
|
|
718
|
+
!!Native.ts_node_is_missing(@val)
|
|
705
719
|
end
|
|
706
720
|
|
|
707
721
|
# Iterate over child nodes
|
data/lib/tree_haver/node.rb
CHANGED
data/lib/tree_haver/version.rb
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tree_haver
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
4
|
+
version: 4.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter H. Boling
|
|
@@ -298,10 +298,10 @@ licenses:
|
|
|
298
298
|
- MIT
|
|
299
299
|
metadata:
|
|
300
300
|
homepage_uri: https://tree-haver.galtzo.com/
|
|
301
|
-
source_code_uri: https://github.com/kettle-rb/tree_haver/tree/v4.0.
|
|
302
|
-
changelog_uri: https://github.com/kettle-rb/tree_haver/blob/v4.0.
|
|
301
|
+
source_code_uri: https://github.com/kettle-rb/tree_haver/tree/v4.0.2
|
|
302
|
+
changelog_uri: https://github.com/kettle-rb/tree_haver/blob/v4.0.2/CHANGELOG.md
|
|
303
303
|
bug_tracker_uri: https://github.com/kettle-rb/tree_haver/issues
|
|
304
|
-
documentation_uri: https://www.rubydoc.info/gems/tree_haver/4.0.
|
|
304
|
+
documentation_uri: https://www.rubydoc.info/gems/tree_haver/4.0.2
|
|
305
305
|
funding_uri: https://github.com/sponsors/pboling
|
|
306
306
|
wiki_uri: https://github.com/kettle-rb/tree_haver/wiki
|
|
307
307
|
news_uri: https://www.railsbling.com/tags/tree_haver
|
metadata.gz.sig
CHANGED
|
Binary file
|