syntax_tree_ext 0.8.0 → 0.8.1

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: c33e697b9e1cdb6dd491d93f8dc78482ac0a358e1ecb2127a9f377d940df901c
4
- data.tar.gz: 07f73e482d4740e1bfa13cd9d293accebe5e0fcb52374335c5f1d756bf5c6591
3
+ metadata.gz: 1378d5d7cf0504986f6069156fc99ad00495aa48bc050e3f6c472cdd69b3f873
4
+ data.tar.gz: a150fc0816566b8e2f97f23b77581749ce293dce85134cbefefd7bfcfb483a81
5
5
  SHA512:
6
- metadata.gz: 5e6dd31f3504dcca0ac4d70d0282ee7ab4d56523c31f2394ef16f5908abb17cccc2933e5d18207833f615d43d56eeebf9e3576e931a9ee63d442d2fdf45a9340
7
- data.tar.gz: 0bff0422c3e75dd21dec2de6d0d991ec71c18d5a974cc1a72ccc2ba854fd49e4a8ab42994fc7c6290e90f5867ad62c96a566f5a7deddaa84497d88849a73cf69
6
+ metadata.gz: 368753ba1fee1baf379a0e042a06903448d5dbbf1a3eee3e281abc5c59ad76031fbd3b838f66397a42b42e0323f135e211f6b82f8a2e58f8fd6020ba7fb39c58
7
+ data.tar.gz: aeec372ffb15142e854cd18dce78fcbc963a4702de6ffb363ea1df7b96d5563fa5a942a0dd9920a1bdc196781f96daba4d8d5cd00570d705bea4ba53384566ba
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.8.1 (2024-04-07)
4
+
5
+ * Extend `parse` with different method names
6
+
3
7
  ## 0.8.0 (2024-04-07)
4
8
 
5
9
  * Abstract `syntax_tree_ext/parent_node_ext`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- syntax_tree_ext (0.8.0)
4
+ syntax_tree_ext (0.8.1)
5
5
  syntax_tree
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Build Status](https://github.com/synvert-hq/syntax_tree_ext/actions/workflows/main.yml/badge.svg)](https://github.com/synvert-hq/syntax_tree_ext/actions/workflows/main.yml)
4
4
  [![Gem Version](https://img.shields.io/gem/v/syntax_tree_ext.svg)](https://rubygems.org/gems/syntax_tree_ext)
5
5
 
6
- It adds some helpers syntax_tree node.
6
+ It adds some helpers to syntax_tree node.
7
7
 
8
8
  ## Installation
9
9
 
@@ -2,10 +2,10 @@
2
2
 
3
3
  module SyntaxTree
4
4
  class << self
5
- alias_method :original_parse, :parse
5
+ alias_method :original_parse_parent, :parse
6
6
 
7
7
  def parse(source)
8
- node = original_parse(source)
8
+ node = original_parse_parent(source)
9
9
  node.set_parent_node(source)
10
10
  node
11
11
  end
@@ -14,7 +14,7 @@ module SyntaxTree
14
14
  class Node
15
15
  attr_accessor :parent_node
16
16
 
17
- def set_parent_node_and_source(source)
17
+ def set_parent_node(source)
18
18
  self.deconstruct_keys([]).filter { |key, _value| ![:location, :comments].include?(key) }.values.each do |child_node|
19
19
  if child_node.is_a?(Array)
20
20
  child_node.each do |child_child_node|
@@ -2,10 +2,10 @@
2
2
 
3
3
  module SyntaxTree
4
4
  class << self
5
- alias_method :original_parse, :parse
5
+ alias_method :original_parse_source, :parse
6
6
 
7
7
  def parse(source)
8
- node = original_parse(source)
8
+ node = original_parse_source(source)
9
9
  node.set_source(source)
10
10
  node
11
11
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SyntaxTreeExt
4
- VERSION = "0.8.0"
4
+ VERSION = "0.8.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syntax_tree_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang