lib/opulent/parser/node.rb in opulent-1.6.3 vs lib/opulent/parser/node.rb in opulent-1.6.5
- old
+ new
@@ -94,19 +94,27 @@
#
# @param node_name [Symbol] Node identifier
# @param call_context [Node] Initial node call with its attributes
#
def process_definition(node_name, call_context)
- model = @definitions[node_name].clone
+ model = [
+ :def,
+ node_name,
+ {},
+ [],
+ call_context[@indent]
+ ]
model[@options] = {}.merge model[@options]
model[@options][:call] = call_context
+ # Deprecated @version 1.6.4
+ #
# Recursively map each child nodes to their definitions
# for the initial call node children and for the model
# children
- process_definition_child model[@options][:call]
- process_definition_child model
+ # process_definition_child model[@options][:call]
+ # process_definition_child model
model
end
# Process definition children for the current node.
@@ -115,10 +123,10 @@
#
def process_definition_child(node)
node[@children].map! do |child|
if child[@type] == :node
if !@definition_stack.include?(child[@value]) &&
- @definitions.keys.include?(child[@value])
+ @definitions.key?(child[@value])
process_definition child[@value], child
else
process_definition_child child if child[@children]
child
end