synvert-core 0.58.0 → 0.58.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5580dae81209573a74a22792f5f50f329805eb67d74c67d28beb9438115a6ba
|
4
|
+
data.tar.gz: 3e97957ff1b4af95a5506ff240c0e500ccf69242d4c03a5db16c84ae03917520
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6829aded4d70daf81fa7cab074c7029ee945997434d357cc251cd993ba89ec56bb1b74b4d98964a150cad0d8f3fbb0f9781f31c5eab760b3c5ba392dffac17f1
|
7
|
+
data.tar.gz: 57d35f30118d60e234595d66b65580f29b205e7f09115ce3b44c1085d6845ff02c831855e2cd7267983b9e7a87a1480080f28a4cb533a0520b944e445bccd15b
|
data/CHANGELOG.md
CHANGED
@@ -432,8 +432,8 @@ module Parser::AST
|
|
432
432
|
def recursive_children(&block)
|
433
433
|
children.each do |child|
|
434
434
|
if child.is_a?(Parser::AST::Node)
|
435
|
-
|
436
|
-
child.recursive_children(&block) unless
|
435
|
+
stop = yield child
|
436
|
+
child.recursive_children(&block) unless stop == :stop
|
437
437
|
end
|
438
438
|
end
|
439
439
|
end
|
@@ -55,7 +55,7 @@ module Synvert::Core
|
|
55
55
|
|
56
56
|
def squeeze_spaces
|
57
57
|
if file_source[@begin_pos - 1] == ' ' && file_source[@end_pos] == ' '
|
58
|
-
@begin_pos
|
58
|
+
@begin_pos -= 1
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
@@ -67,19 +67,19 @@ module Synvert::Core
|
|
67
67
|
after_line_is_blank = lines[end_line] == ''
|
68
68
|
|
69
69
|
if lines.length > 1 && before_line_is_blank && after_line_is_blank
|
70
|
-
@end_pos
|
70
|
+
@end_pos += "\n".length
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
74
|
def remove_comma
|
75
75
|
if ',' == file_source[@begin_pos - 1]
|
76
|
-
@begin_pos
|
76
|
+
@begin_pos -= 1
|
77
77
|
elsif ', ' == file_source[@begin_pos - 2, 2]
|
78
|
-
@begin_pos
|
78
|
+
@begin_pos -= 2
|
79
79
|
elsif ', ' == file_source[@end_pos, 2]
|
80
|
-
@end_pos
|
80
|
+
@end_pos += 2
|
81
81
|
elsif ',' == file_source[@end_pos]
|
82
|
-
@end_pos
|
82
|
+
@end_pos += 1
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
@@ -21,7 +21,7 @@ module Synvert::Core
|
|
21
21
|
elsif File.exist?(File.join(Configuration.path, '.rvmrc'))
|
22
22
|
versionFile = '.rvmrc'
|
23
23
|
end
|
24
|
-
return true
|
24
|
+
return true unless versionFile
|
25
25
|
|
26
26
|
version = File.read(File.join(Configuration.path, versionFile))
|
27
27
|
Gem::Version.new(version) >= Gem::Version.new(@version)
|
@@ -89,10 +89,12 @@ module Synvert::Core
|
|
89
89
|
return matching_nodes
|
90
90
|
end
|
91
91
|
current_node.recursive_children do |child_node|
|
92
|
+
stop = nil
|
92
93
|
if child_node.match?(@rules)
|
93
94
|
matching_nodes << child_node
|
94
|
-
|
95
|
+
stop = :stop
|
95
96
|
end
|
97
|
+
stop
|
96
98
|
end
|
97
99
|
else
|
98
100
|
current_node.each do |node|
|
@@ -101,10 +103,12 @@ module Synvert::Core
|
|
101
103
|
next
|
102
104
|
end
|
103
105
|
node.recursive_children do |child_node|
|
106
|
+
stop = nil
|
104
107
|
if child_node.match?(@rules)
|
105
108
|
matching_nodes << child_node
|
106
|
-
|
109
|
+
stop = :stop
|
107
110
|
end
|
111
|
+
stop
|
108
112
|
end
|
109
113
|
end
|
110
114
|
end
|
data/lib/synvert/core/version.rb
CHANGED