Method: Jinx::Visitor#node_children

Defined in:
lib/jinx/helpers/visitor.rb

#node_children(node) ⇒ Object (protected)

Returns the children to visit for the given node.



202
203
204
205
206
# File 'lib/jinx/helpers/visitor.rb', line 202

def node_children(node)
  children = @navigator.call(node)
  return Array::EMPTY_ARRAY if children.nil?
  Enumerable === children ? children.to_a.compact : [children]
end