csdl 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/csdl/interaction_filter_processor.rb +7 -6
- data/lib/csdl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d619a1a1247aa90f4208236515b2e9babf7a2fe
|
4
|
+
data.tar.gz: 23668650182608ad4b8824552164a821ad82d1d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8024a4518a67bb92ed703301f0cbd97bedc9080cabc106a3ab740fdb7904cd2bbe9c7e257b02587d5ff4da691759aaad3467219b2cd41ec5a140092703e5dc31
|
7
|
+
data.tar.gz: 9ddee6b21793b7b3df25664ade3ef3f6260a4b055ed708d8ea88187ae08b063685261d954386f0910d6b62fb72f88632efea3134d0832ce53dcecc0744f9ee91
|
@@ -50,7 +50,7 @@ module CSDL
|
|
50
50
|
# @return [String] The processed :statement_scope child node, prepended by the "return" keyword.
|
51
51
|
#
|
52
52
|
def on_return(node)
|
53
|
-
statement_scope = node.children.find { |child| child.type == :statement_scope }
|
53
|
+
statement_scope = node.children.compact.find { |child| child.type == :statement_scope }
|
54
54
|
|
55
55
|
if statement_scope.nil?
|
56
56
|
fail ::CSDL::MissingReturnStatementScopeError, "Invalid CSDL AST: return statment scope is missing"
|
@@ -74,7 +74,7 @@ module CSDL
|
|
74
74
|
# @see #on_tag
|
75
75
|
#
|
76
76
|
def on_statement_scope(node)
|
77
|
-
"{" + process_all(node.children).join(" ") + "}"
|
77
|
+
"{" + process_all(node.children.compact).join(" ") + "}"
|
78
78
|
end
|
79
79
|
|
80
80
|
# Process :tag node with it's child nodes :tag_namespaces (optional), :tag_class, and :statement_scope.
|
@@ -107,9 +107,10 @@ module CSDL
|
|
107
107
|
# @raise [MissingTagStatementScopeError] When we don't have a first-level :statement_scope child.
|
108
108
|
#
|
109
109
|
def on_tag(node)
|
110
|
-
|
111
|
-
|
112
|
-
|
110
|
+
children = node.children.compact
|
111
|
+
tag_namespaces = children.find { |child| child.type == :tag_namespaces }
|
112
|
+
tag_class = children.find { |child| child.type == :tag_class }
|
113
|
+
statement_scope = children.find { |child| child.type == :statement_scope }
|
113
114
|
|
114
115
|
if tag_class.nil?
|
115
116
|
fail ::CSDL::MissingTagClassError, "Invalid CSDL AST: :tag node must have a :tag_class child node"
|
@@ -168,7 +169,7 @@ module CSDL
|
|
168
169
|
# @raise [MissingTagNodesError] When there aren't any first-level :tag_namespace child nodes.
|
169
170
|
#
|
170
171
|
def on_tag_namespaces(node)
|
171
|
-
child_tag_namespaces = node.children.select { |child| child.type == :tag_namespace }
|
172
|
+
child_tag_namespaces = node.children.compact.select { |child| child.type == :tag_namespace }
|
172
173
|
|
173
174
|
if child_tag_namespaces.empty?
|
174
175
|
fail ::CSDL::MissingTagNodesError, "Invalid CSDL AST: A :tag_namespaces node must have at least one :tag_namespace child"
|
data/lib/csdl/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csdl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BJ Neilsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ast
|