node_mutation 1.23.2 → 1.23.3

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: 8428c48e2173db74d4ab6fca16ae15076106a021792ad2f24ff4e568a6d9af42
4
- data.tar.gz: 4ffe5f7ebc5182b9a493bac7556a3ebe3bb140b435bad9df3529fc49b9e17315
3
+ metadata.gz: e941ef481546d5db16679d319312e0541c63b61cf5dceefcef91b97625e9ee18
4
+ data.tar.gz: e0638f659b75f11cbfadcbddb2a108e50b2e0055918a608b352661a54f5b66b6
5
5
  SHA512:
6
- metadata.gz: 85f90dbcb989220b83677298a8606f7ac33a1db5db5e3d71bab5753e48c62d2f3dd3b7a40fdda548cd6f9fc1a5fe24fc6d4b285f78ecc06b8a1e29145a282bfc
7
- data.tar.gz: c8ff9b11d12b5bdf7d2b550a48e55539abed67880f7b5a410f118f342001847b476b57600628906fe69ee410b8aca73dc9161cac979b45a98ef1eb4a07bd52ed
6
+ metadata.gz: 5546f83edb1e5cbf6550a9400bacee3d478ead1f8898572be71aaa1e136ffb4fe62aea1927f5eae517d8cbc171b3371700fda96ca8ec3b581e38b5a257194467
7
+ data.tar.gz: cdd3a1497c5e6a4e451cdba7af3b55287a3859a4b435b7a8c63108851b1599babd17e78c68d91126ae382c6ecfc98ce2d982d6f871a0ab7c828e9685d3a1cce5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # NodeMutation
2
2
 
3
+ ## 1.23.3 (2024-02-20)
4
+
5
+ * `child_node_range` supports `LocalVariableReadNode#name`
6
+
3
7
  ## 1.23.2 (2024-02-17)
4
8
 
5
9
  * Get prism node `source` without prism_ext
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- node_mutation (1.23.2)
4
+ node_mutation (1.23.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -141,6 +141,8 @@ class NodeMutation::PrismAdapter < NodeMutation::Adapter
141
141
  NodeMutation::Struct::Range.new(node_loc.start_offset, node_loc.end_offset) if node_loc
142
142
  elsif node.is_a?(Prism::CallNode) && child_name.to_sym == :name
143
143
  NodeMutation::Struct::Range.new(node.message_loc.start_offset, node.message_loc.end_offset)
144
+ elsif node.is_a?(Prism::LocalVariableReadNode) && child_name.to_sym == :name
145
+ NodeMutation::Struct::Range.new(node.location.start_offset, node.location.end_offset)
144
146
  else
145
147
  raise NodeMutation::MethodNotSupported,
146
148
  "#{direct_child_name} is not supported for #{get_source(node)}" unless node.respond_to?(direct_child_name)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class NodeMutation
4
- VERSION = "1.23.2"
4
+ VERSION = "1.23.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: node_mutation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.2
4
+ version: 1.23.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-17 00:00:00.000000000 Z
11
+ date: 2024-02-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ast node mutation apis
14
14
  email: