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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/syntax_tree_ext/parent_node_ext.rb +3 -3
- data/lib/syntax_tree_ext/source_ext.rb +2 -2
- data/lib/syntax_tree_ext/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1378d5d7cf0504986f6069156fc99ad00495aa48bc050e3f6c472cdd69b3f873
|
4
|
+
data.tar.gz: a150fc0816566b8e2f97f23b77581749ce293dce85134cbefefd7bfcfb483a81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 368753ba1fee1baf379a0e042a06903448d5dbbf1a3eee3e281abc5c59ad76031fbd3b838f66397a42b42e0323f135e211f6b82f8a2e58f8fd6020ba7fb39c58
|
7
|
+
data.tar.gz: aeec372ffb15142e854cd18dce78fcbc963a4702de6ffb363ea1df7b96d5563fa5a942a0dd9920a1bdc196781f96daba4d8d5cd00570d705bea4ba53384566ba
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
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 :
|
5
|
+
alias_method :original_parse_parent, :parse
|
6
6
|
|
7
7
|
def parse(source)
|
8
|
-
node =
|
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
|
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 :
|
5
|
+
alias_method :original_parse_source, :parse
|
6
6
|
|
7
7
|
def parse(source)
|
8
|
-
node =
|
8
|
+
node = original_parse_source(source)
|
9
9
|
node.set_source(source)
|
10
10
|
node
|
11
11
|
end
|