ruby_tree_sitter 1.12.0-aarch64-linux-gnu → 2.0.0-aarch64-linux-gnu

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: b27cb725a9a62695ff0b9f90767c4dc04bde88cf553feaf9331fd574147ee32b
4
- data.tar.gz: cea65a29dbb6ab43be8edd534692dda1bf16abc949677086cd02c96dd5fa2927
3
+ metadata.gz: 1da9c7ab2ed31dc28bdb6c1dba3ee3a044c2ca1a6c705b00d6c20b85d03ddf68
4
+ data.tar.gz: f05b73d792c8c716f6d03158d069228c58ff1fa0f51bcf47dc8eeda732103e6d
5
5
  SHA512:
6
- metadata.gz: 3c2ab7c5a59dd605e8d85d91e9d996f66c0a32a77f955e406815e1dbe9a62c1eb37b2e31a03812523218c5e51d6beb73c913b95e8ae171c2b4b8bd396a032bbd
7
- data.tar.gz: e2d59df0255eb01c7e9145edbc3d5f891a80d7db61e4bdd8ad3de6995d3c5bc7b3a90eb639219221d7491240377d1c053ceff66133c2c5d45b8617065a2efbee
6
+ metadata.gz: 767a4ed9b1fc5479823a18f992e4555115dc0af42d4550efbb8d4cccc0c4119474d226cd3f81b3e2f30721a10256c48742981fe68a6a659d1b6376cdffe4eaaf
7
+ data.tar.gz: bdff57ec32668c02a65f85bce9e2b7c161b1f50c90454344dd2963f88192b26e821399c1d85315ca5a7e12e6de31efd0c7a7e41aa1ba784095b9112a63b75e69
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-gnu
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: []