node_mutation 1.15.1 → 1.15.2

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: 382d91776358172b2310f5281edc413bf6066da9e333e150fa14a068219058bf
4
- data.tar.gz: 5bdeef13cc69a5f4e6b9abef45ed95eeab57b13e95bed01a8fb0f25b02788140
3
+ metadata.gz: 3fadeda3c2cf8d3f0d618b4a9996241619ab404fef419e87026a443c8078e06f
4
+ data.tar.gz: 39d9939b21c96821ce056ad1983b301d16fc1d49c936ce082e3b208a6a93547c
5
5
  SHA512:
6
- metadata.gz: b35c57db840700ed2a53ea3f0b1713185da7c36b4759537709ce726cf1094f862dcdd9cc2e5a19cdb99b0ef34ebe1436414e17c35915f6694b3c7ee66bf4a163
7
- data.tar.gz: 2ad6b1ec1f27bad428cc299ffb95f3fce4bd57338365a60707736ae9936aaf15f445d89d8cf339224f4994391907a9df6d3e7ee2dfb2cc394782c2b83261645f
6
+ metadata.gz: bdbfe2e830ef226679fa3556b52a23f67755afb2e33a7f8efaf5bd47e4f0e1d59f3b43af99bf4542587b2c9eee832a5309f0531689cc98cb954e38ca03bc0edc
7
+ data.tar.gz: b9b9d033e38d84f4672cdb3630d44f8179af09ceb268b25d9e88fe3a86eff97d543f710d3f0c3ecbb3f8a2c22c45de2998a02b32b454dd2eff08d6d907ba4f4e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # NodeMutation
2
2
 
3
+ ## 1.15.2 (2023-04-17)
4
+
5
+ * Support `const` `double_colon` in child_node_range
6
+
3
7
  ## 1.15.1 (2023-04-17)
4
8
 
5
9
  * Fix `wrap` code for newline
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- node_mutation (1.15.1)
4
+ node_mutation (1.15.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -90,6 +90,8 @@ class NodeMutation::ParserAdapter < NodeMutation::Adapter
90
90
  )
91
91
  when %i[class name], %i[const name], %i[cvar name], %i[def name], %i[defs name], %i[gvar name], %i[ivar name], %i[lvar name]
92
92
  NodeMutation::Struct::Range.new(node.loc.name.begin_pos, node.loc.name.end_pos)
93
+ when %i[const double_colon]
94
+ NodeMutation::Struct::Range.new(node.loc.double_colon.begin_pos, node.loc.double_colon.end_pos)
93
95
  when %i[defs dot]
94
96
  NodeMutation::Struct::Range.new(node.loc.operator.begin_pos, node.loc.operator.end_pos) if node.loc.operator
95
97
  when %i[defs self]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class NodeMutation
4
- VERSION = "1.15.1"
4
+ VERSION = "1.15.2"
5
5
  end
@@ -23,6 +23,8 @@ module NodeMutation[T]
23
23
 
24
24
  def delete: (node: T, *selectors: Array[String], **options: { and_comma: bool }) -> void
25
25
 
26
+ def indent: (node: T, ?tab_size: Integer) -> void
27
+
26
28
  def insert: (node: T, code: String, ?at: "beginning" | "end", ?to: nil | String) -> void
27
29
 
28
30
  def prepend: (node: T, code: String) -> void
@@ -33,7 +35,7 @@ module NodeMutation[T]
33
35
 
34
36
  def replace_with: (node: T, code: String) -> void
35
37
 
36
- def wrap: (node: T, prefix: String, suffix: String, newline: bool) -> void
38
+ def wrap: (node: T, prefix: String, suffix: String, ?newline: bool) -> void
37
39
 
38
40
  def noop: (node: T) -> void
39
41
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: node_mutation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.1
4
+ version: 1.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang