ruby_tree_sitter 1.12.0-aarch64-linux-musl → 2.0.0-aarch64-linux-musl

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64faa77b44b51862e050c97ba0b07b0ed552005f407b24556a67bf617c6b593f
4
- data.tar.gz: 22a578b50ffaebedf02711532190f6b8d9ebaf93708cb2fbecde2ba7ce968896
3
+ metadata.gz: 29ba9626aebacc40cb405922443f1bc809f7c77f617666d109ae1ff61ab59c4b
4
+ data.tar.gz: 533684630969ecb376fdeeb8e451d50bc3a6220641b4cc3d7d344b9b458f1833
5
5
  SHA512:
6
- metadata.gz: 2a9d565a2c7034ab7a2cdf24c961988c5f05ce443069b8634c331dae85c7361af7a483449c8e85ff6b894d891727f0245f71fa5778a9212fd76c3c1154d75525
7
- data.tar.gz: 8eae93f2cce2a8c212a3f84ff0d886432a4e57a65de8b5cee0fb516da9ade745ba4d350fd635eb93f9fe7ac2b7de43fd81206d6030c0e25ac7c106d7af602efc
6
+ metadata.gz: 9b481441d5ee7ecad40572ce647de627fbea399d51ce29a59ef27d55c11a484c207f56ffb962fc24bedfc91c1f1482dfd77e37f02ae5ea35077463443a740603
7
+ data.tar.gz: 23d26b0b5d5951adc1d2fb254c294c8ee83cd874739bff4a45ec072979456523bf7b71c30985205051a704ee0406048e81772e4fcc664f6e6dc010fa169c583a
Binary file
Binary file
Binary file
Binary file
@@ -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, &block)
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?
@@ -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, &_block)
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(&_block)
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: indent,
196
- width: width,
197
- source: 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: 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.text "#{field_name}:"
231
- out.group(indent) {
232
- brk(out, vertical)
233
- child.sexpr_recur(indent: indent, width: width, out: out, vertical: vertical, source: source)
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: indent, width: width, out: out, vertical: vertical, source: source)
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
@@ -15,7 +15,7 @@ module TreeSitter
15
15
  #
16
16
  # @yieldparam match [TreeSitter::QueryMatch]
17
17
  # @yieldparam capture_index [Integer]
18
- def each(&_block)
18
+ def each(&)
19
19
  return enum_for __method__ if !block_given?
20
20
 
21
21
  while (capture_index, match = @cursor.next_capture)
@@ -14,7 +14,7 @@ module TreeSitter
14
14
  # Iterator over matches.
15
15
  #
16
16
  # @yieldparam match [TreeSitter::QueryMatch]
17
- def each(&_block)
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(&_block)
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
 
@@ -4,5 +4,5 @@ module TreeSitter
4
4
  # The version of the tree-sitter library.
5
5
  TREESITTER_VERSION = '0.24.7'
6
6
  # The current version of the gem.
7
- VERSION = '1.12.0'
7
+ VERSION = '2.0.0'
8
8
  end
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.0.0')
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.9.8'
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: 1.12.0
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-15 00:00:00.000000000 Z
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.9.8
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.9.8
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.3'
138
+ version: '3.1'
139
139
  - - "<"
140
140
  - !ruby/object:Gem::Version
141
- version: 3.4.dev
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.3.27
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: []