ruby_tree_sitter 1.12.0-aarch64-linux-musl → 2.0.0-aarch64-linux-musl
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
 - data/lib/tree_sitter/3.1/tree_sitter.so +0 -0
 - data/lib/tree_sitter/3.2/tree_sitter.so +0 -0
 - data/lib/tree_sitter/3.3/tree_sitter.so +0 -0
 - data/lib/tree_sitter/3.4/tree_sitter.so +0 -0
 - data/lib/tree_sitter/helpers.rb +1 -1
 - data/lib/tree_sitter/node.rb +15 -16
 - data/lib/tree_sitter/query_captures.rb +1 -1
 - data/lib/tree_sitter/query_matches.rb +2 -2
 - data/lib/tree_sitter/version.rb +1 -1
 - data/tree_sitter.gemspec +2 -2
 - metadata +10 -11
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 29ba9626aebacc40cb405922443f1bc809f7c77f617666d109ae1ff61ab59c4b
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 533684630969ecb376fdeeb8e451d50bc3a6220641b4cc3d7d344b9b458f1833
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 9b481441d5ee7ecad40572ce647de627fbea399d51ce29a59ef27d55c11a484c207f56ffb962fc24bedfc91c1f1482dfd77e37f02ae5ea35077463443a740603
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 23d26b0b5d5951adc1d2fb254c294c8ee83cd874739bff4a45ec072979456523bf7b71c30985205051a704ee0406048e81772e4fcc664f6e6dc010fa169c583a
         
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
    
        data/lib/tree_sitter/helpers.rb
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            # splits an array like [rust](https://doc.rust-lang.org/std/primitive.slice.html#method.split)
         
     | 
| 
       4 
     | 
    
         
            -
            def array_split_like_rust(array, & 
     | 
| 
      
 4 
     | 
    
         
            +
            def array_split_like_rust(array, &)
         
     | 
| 
       5 
5 
     | 
    
         
             
              return enum_for(__method__, array) if !block_given?
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
              return [] if array.empty?
         
     | 
    
        data/lib/tree_sitter/node.rb
    CHANGED
    
    | 
         @@ -72,7 +72,7 @@ module TreeSitter 
     | 
|
| 
       72 
72 
     | 
    
         
             
                # @!visibility private
         
     | 
| 
       73 
73 
     | 
    
         
             
                #
         
     | 
| 
       74 
74 
     | 
    
         
             
                # Allows access to child_by_field_name without using [].
         
     | 
| 
       75 
     | 
    
         
            -
                def method_missing(method_name, *_args, & 
     | 
| 
      
 75 
     | 
    
         
            +
                def method_missing(method_name, *_args, &)
         
     | 
| 
       76 
76 
     | 
    
         
             
                  if fields.include?(method_name)
         
     | 
| 
       77 
77 
     | 
    
         
             
                    child_by_field_name(method_name.to_s)
         
     | 
| 
       78 
78 
     | 
    
         
             
                  else
         
     | 
| 
         @@ -89,7 +89,7 @@ module TreeSitter 
     | 
|
| 
       89 
89 
     | 
    
         
             
                # Iterate over a node's children.
         
     | 
| 
       90 
90 
     | 
    
         
             
                #
         
     | 
| 
       91 
91 
     | 
    
         
             
                # @yieldparam child [Node] the child
         
     | 
| 
       92 
     | 
    
         
            -
                def each(& 
     | 
| 
      
 92 
     | 
    
         
            +
                def each(&)
         
     | 
| 
       93 
93 
     | 
    
         
             
                  return enum_for __method__ if !block_given?
         
     | 
| 
       94 
94 
     | 
    
         | 
| 
       95 
95 
     | 
    
         
             
                  (0...child_count).each do |i|
         
     | 
| 
         @@ -192,9 +192,9 @@ module TreeSitter 
     | 
|
| 
       192 
192 
     | 
    
         
             
                def sexpr(indent: 2, width: 120, source: nil, vertical: nil)
         
     | 
| 
       193 
193 
     | 
    
         
             
                  res =
         
     | 
| 
       194 
194 
     | 
    
         
             
                    sexpr_recur(
         
     | 
| 
       195 
     | 
    
         
            -
                      indent 
     | 
| 
       196 
     | 
    
         
            -
                      width 
     | 
| 
       197 
     | 
    
         
            -
                      source 
     | 
| 
      
 195 
     | 
    
         
            +
                      indent:,
         
     | 
| 
      
 196 
     | 
    
         
            +
                      width:,
         
     | 
| 
      
 197 
     | 
    
         
            +
                      source:,
         
     | 
| 
       198 
198 
     | 
    
         
             
                      vertical: !source.nil? || !!vertical,
         
     | 
| 
       199 
199 
     | 
    
         
             
                    ).output
         
     | 
| 
       200 
200 
     | 
    
         
             
                  return res if source.nil?
         
     | 
| 
         @@ -208,9 +208,7 @@ module TreeSitter 
     | 
|
| 
       208 
208 
     | 
    
         
             
                      max_width = [max_width, base.length].max
         
     | 
| 
       209 
209 
     | 
    
         
             
                      [base, extracted]
         
     | 
| 
       210 
210 
     | 
    
         
             
                    }
         
     | 
| 
       211 
     | 
    
         
            -
                    .map { |base, extracted|
         
     | 
| 
       212 
     | 
    
         
            -
                      ("%-#{max_width}s | %s" % [base, extracted]).rstrip
         
     | 
| 
       213 
     | 
    
         
            -
                    }
         
     | 
| 
      
 211 
     | 
    
         
            +
                    .map { |base, extracted| ("%-#{max_width}s | %s" % [base, extracted]).rstrip }
         
     | 
| 
       214 
212 
     | 
    
         
             
                    .join("\n")
         
     | 
| 
       215 
213 
     | 
    
         
             
                end
         
     | 
| 
       216 
214 
     | 
    
         | 
| 
         @@ -218,8 +216,8 @@ module TreeSitter 
     | 
|
| 
       218 
216 
     | 
    
         
             
                #
         
     | 
| 
       219 
217 
     | 
    
         
             
                # @!visibility private
         
     | 
| 
       220 
218 
     | 
    
         
             
                def sexpr_recur(indent: 2, width: 120, out: nil, source: nil, vertical: false)
         
     | 
| 
       221 
     | 
    
         
            -
                  out ||= Oppen::Wadler.new(width: 
     | 
| 
       222 
     | 
    
         
            -
                  out.group(indent) {
         
     | 
| 
      
 219 
     | 
    
         
            +
                  out ||= Oppen::Wadler.new(width:)
         
     | 
| 
      
 220 
     | 
    
         
            +
                  out.group(indent:) {
         
     | 
| 
       223 
221 
     | 
    
         
             
                    out.text "(#{type}"
         
     | 
| 
       224 
222 
     | 
    
         
             
                    if source.is_a?(String) && child_count.zero?
         
     | 
| 
       225 
223 
     | 
    
         
             
                      out.text "\0{#{source.byteslice(start_byte...end_byte)}\0}", width: 0
         
     | 
| 
         @@ -227,13 +225,14 @@ module TreeSitter 
     | 
|
| 
       227 
225 
     | 
    
         
             
                    brk(out, vertical) if child_count.positive?
         
     | 
| 
       228 
226 
     | 
    
         
             
                    each.with_index do |child, index|
         
     | 
| 
       229 
227 
     | 
    
         
             
                      if field_name = field_name_for_child(index)
         
     | 
| 
       230 
     | 
    
         
            -
                        out 
     | 
| 
       231 
     | 
    
         
            -
             
     | 
| 
       232 
     | 
    
         
            -
                           
     | 
| 
       233 
     | 
    
         
            -
             
     | 
| 
       234 
     | 
    
         
            -
             
     | 
| 
      
 228 
     | 
    
         
            +
                        out
         
     | 
| 
      
 229 
     | 
    
         
            +
                          .text("#{field_name}:")
         
     | 
| 
      
 230 
     | 
    
         
            +
                          .group(indent:) {
         
     | 
| 
      
 231 
     | 
    
         
            +
                            brk(out, vertical)
         
     | 
| 
      
 232 
     | 
    
         
            +
                            child.sexpr_recur(indent:, width:, out:, vertical:, source:)
         
     | 
| 
      
 233 
     | 
    
         
            +
                          }
         
     | 
| 
       235 
234 
     | 
    
         
             
                      else
         
     | 
| 
       236 
     | 
    
         
            -
                        child.sexpr_recur(indent 
     | 
| 
      
 235 
     | 
    
         
            +
                        child.sexpr_recur(indent:, width:, out:, vertical:, source:)
         
     | 
| 
       237 
236 
     | 
    
         
             
                      end
         
     | 
| 
       238 
237 
     | 
    
         
             
                      brk(out, vertical) if index < child_count - 1
         
     | 
| 
       239 
238 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -14,7 +14,7 @@ module TreeSitter 
     | 
|
| 
       14 
14 
     | 
    
         
             
                # Iterator over matches.
         
     | 
| 
       15 
15 
     | 
    
         
             
                #
         
     | 
| 
       16 
16 
     | 
    
         
             
                # @yieldparam match [TreeSitter::QueryMatch]
         
     | 
| 
       17 
     | 
    
         
            -
                def each(& 
     | 
| 
      
 17 
     | 
    
         
            +
                def each(&)
         
     | 
| 
       18 
18 
     | 
    
         
             
                  return enum_for __method__ if !block_given?
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
                  while match = @cursor.next_match
         
     | 
| 
         @@ -27,7 +27,7 @@ module TreeSitter 
     | 
|
| 
       27 
27 
     | 
    
         
             
                # Iterate over all the results presented as hashes of `capture name => node`.
         
     | 
| 
       28 
28 
     | 
    
         
             
                #
         
     | 
| 
       29 
29 
     | 
    
         
             
                # @yieldparam match [Hash<String, TreeSitter::Node>]
         
     | 
| 
       30 
     | 
    
         
            -
                def each_capture_hash(& 
     | 
| 
      
 30 
     | 
    
         
            +
                def each_capture_hash(&)
         
     | 
| 
       31 
31 
     | 
    
         
             
                  # TODO: should we return [Array<Hash<Symbol, TreeSitter::Node]>>] instead?
         
     | 
| 
       32 
32 
     | 
    
         
             
                  return enum_for __method__ if !block_given?
         
     | 
| 
       33 
33 
     | 
    
         | 
    
        data/lib/tree_sitter/version.rb
    CHANGED
    
    
    
        data/tree_sitter.gemspec
    CHANGED
    
    | 
         @@ -6,7 +6,7 @@ $LOAD_PATH.unshift(lib) if !$LOAD_PATH.include?(lib) 
     | 
|
| 
       6 
6 
     | 
    
         
             
            require 'tree_sitter/version'
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
            Gem::Specification.new do |spec|
         
     | 
| 
       9 
     | 
    
         
            -
              spec.required_ruby_version = Gem::Requirement.new('>= 3. 
     | 
| 
      
 9 
     | 
    
         
            +
              spec.required_ruby_version = Gem::Requirement.new('>= 3.1.0')
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
              spec.authors       = ['Firas al-Khalil', 'Derek Stride']
         
     | 
| 
       12 
12 
     | 
    
         
             
              spec.email         = ['firasalkhalil@gmail.com', 'derek@stride.host']
         
     | 
| 
         @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       31 
31 
     | 
    
         
             
              spec.executables  << 'rbts' << 'print_matches'
         
     | 
| 
       32 
32 
     | 
    
         
             
              spec.require_paths = ['lib']
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
       34 
     | 
    
         
            -
              spec.add_dependency 'oppen', '~> 0 
     | 
| 
      
 34 
     | 
    
         
            +
              spec.add_dependency 'oppen', '~> 1.0'
         
     | 
| 
       35 
35 
     | 
    
         
             
              spec.add_dependency 'sorbet-runtime'
         
     | 
| 
       36 
36 
     | 
    
         
             
              spec.add_dependency 'zeitwerk'
         
     | 
| 
       37 
37 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,15 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: ruby_tree_sitter
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version:  
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.0.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: aarch64-linux-musl
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Firas al-Khalil
         
     | 
| 
       8 
8 
     | 
    
         
             
            - Derek Stride
         
     | 
| 
       9 
     | 
    
         
            -
            autorequire: 
         
     | 
| 
       10 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       11 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2025-01- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2025-01-22 00:00:00.000000000 Z
         
     | 
| 
       13 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
14 
     | 
    
         
             
              name: oppen
         
     | 
| 
         @@ -17,14 +16,14 @@ dependencies: 
     | 
|
| 
       17 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       18 
17 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       19 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       20 
     | 
    
         
            -
                    version: 0 
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '1.0'
         
     | 
| 
       21 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       22 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       23 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       24 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       25 
24 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       26 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       27 
     | 
    
         
            -
                    version: 0 
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '1.0'
         
     | 
| 
       28 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       29 
28 
     | 
    
         
             
              name: sorbet-runtime
         
     | 
| 
       30 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -53,7 +52,6 @@ dependencies: 
     | 
|
| 
       53 
52 
     | 
    
         
             
                - - ">="
         
     | 
| 
       54 
53 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       55 
54 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       56 
     | 
    
         
            -
            description: 
         
     | 
| 
       57 
55 
     | 
    
         
             
            email:
         
     | 
| 
       58 
56 
     | 
    
         
             
            - firasalkhalil@gmail.com
         
     | 
| 
       59 
57 
     | 
    
         
             
            - derek@stride.host
         
     | 
| 
         @@ -92,7 +90,10 @@ files: 
     | 
|
| 
       92 
90 
     | 
    
         
             
            - ext/tree_sitter/tree_sitter.c
         
     | 
| 
       93 
91 
     | 
    
         
             
            - ext/tree_sitter/tree_sitter.h
         
     | 
| 
       94 
92 
     | 
    
         
             
            - lib/tree_sitter.rb
         
     | 
| 
      
 93 
     | 
    
         
            +
            - lib/tree_sitter/3.1/tree_sitter.so
         
     | 
| 
      
 94 
     | 
    
         
            +
            - lib/tree_sitter/3.2/tree_sitter.so
         
     | 
| 
       95 
95 
     | 
    
         
             
            - lib/tree_sitter/3.3/tree_sitter.so
         
     | 
| 
      
 96 
     | 
    
         
            +
            - lib/tree_sitter/3.4/tree_sitter.so
         
     | 
| 
       96 
97 
     | 
    
         
             
            - lib/tree_sitter/error.rb
         
     | 
| 
       97 
98 
     | 
    
         
             
            - lib/tree_sitter/helpers.rb
         
     | 
| 
       98 
99 
     | 
    
         
             
            - lib/tree_sitter/mixins/language.rb
         
     | 
| 
         @@ -127,7 +128,6 @@ metadata: 
     | 
|
| 
       127 
128 
     | 
    
         
             
              source_code_uri: https://www.github.com/Faveod/ruby-tree-sitter
         
     | 
| 
       128 
129 
     | 
    
         
             
              changelog_uri: https://www.github.com/Faveod/ruby-tree-sitter
         
     | 
| 
       129 
130 
     | 
    
         
             
              documentation_uri: https://faveod.github.io/ruby-tree-sitter/
         
     | 
| 
       130 
     | 
    
         
            -
            post_install_message: 
         
     | 
| 
       131 
131 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       132 
132 
     | 
    
         
             
            require_paths:
         
     | 
| 
       133 
133 
     | 
    
         
             
            - lib
         
     | 
| 
         @@ -135,18 +135,17 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       135 
135 
     | 
    
         
             
              requirements:
         
     | 
| 
       136 
136 
     | 
    
         
             
              - - ">="
         
     | 
| 
       137 
137 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       138 
     | 
    
         
            -
                  version: '3. 
     | 
| 
      
 138 
     | 
    
         
            +
                  version: '3.1'
         
     | 
| 
       139 
139 
     | 
    
         
             
              - - "<"
         
     | 
| 
       140 
140 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       141 
     | 
    
         
            -
                  version: 3. 
     | 
| 
      
 141 
     | 
    
         
            +
                  version: 3.5.dev
         
     | 
| 
       142 
142 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       143 
143 
     | 
    
         
             
              requirements:
         
     | 
| 
       144 
144 
     | 
    
         
             
              - - ">="
         
     | 
| 
       145 
145 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       146 
146 
     | 
    
         
             
                  version: 3.3.22
         
     | 
| 
       147 
147 
     | 
    
         
             
            requirements: []
         
     | 
| 
       148 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
       149 
     | 
    
         
            -
            signing_key: 
         
     | 
| 
      
 148 
     | 
    
         
            +
            rubygems_version: 3.6.2
         
     | 
| 
       150 
149 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       151 
150 
     | 
    
         
             
            summary: Ruby bindings for Tree-Sitter
         
     | 
| 
       152 
151 
     | 
    
         
             
            test_files: []
         
     |