ravensat 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ravensat/ast/node.rb +10 -3
- data/lib/ravensat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 430c194a8bc6d59ba234e117839a244c0ee4bb61b507615b1a12b1d52609013c
|
4
|
+
data.tar.gz: e2090935ff06835501061059e47156889e13bc9afe7c3a57746958afe6c4abb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5500d691a90e8153d994db9c9fb0f5e4c0729232820fb41b7b6ddf1726a95090a783cf09c272e9459d139b2693effccb1c3e7e55625d15e269fc0595b5235327
|
7
|
+
data.tar.gz: 2e9f44f44ef99640f370eb2329059438670b84e743729e8d4eaa19d585cc02bab17d506c45324971b2034cba7a41af890081f03803ebb7155fafced6d5c5725f
|
data/lib/ravensat/ast/node.rb
CHANGED
@@ -14,6 +14,8 @@ module Ravensat
|
|
14
14
|
current_parent, current_children = node_stack.pop
|
15
15
|
current_node = current_children.shift
|
16
16
|
|
17
|
+
and_node_obj = AndNode.new
|
18
|
+
|
17
19
|
case current_node
|
18
20
|
when AndNode
|
19
21
|
node_stack.push [current_parent, current_children.clone]
|
@@ -26,7 +28,7 @@ module Ravensat
|
|
26
28
|
yield(current_node.children.first)
|
27
29
|
|
28
30
|
if current_children.empty?
|
29
|
-
yield(
|
31
|
+
yield(and_node_obj)
|
30
32
|
else
|
31
33
|
yield(current_parent)
|
32
34
|
node_stack.push [current_parent, current_children.clone]
|
@@ -35,7 +37,7 @@ module Ravensat
|
|
35
37
|
yield(current_node)
|
36
38
|
|
37
39
|
if current_children.empty?
|
38
|
-
yield(
|
40
|
+
yield(and_node_obj)
|
39
41
|
else
|
40
42
|
yield(current_parent)
|
41
43
|
node_stack.push [current_parent, current_children.clone]
|
@@ -88,7 +90,12 @@ module Ravensat
|
|
88
90
|
end
|
89
91
|
|
90
92
|
def clauses_size
|
91
|
-
|
93
|
+
cnt = 0
|
94
|
+
self.each_by_descriptive do |node|
|
95
|
+
cnt+=1 if node.is_a? AndNode
|
96
|
+
end
|
97
|
+
cnt
|
98
|
+
# self.count{|node| node.is_a? AndNode} + 1
|
92
99
|
end
|
93
100
|
end
|
94
101
|
end
|
data/lib/ravensat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ravensat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rikuto matsuda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|