lib/rap_sheet_parser/syntax_nodes/treetop_monkeypatches.rb
# Traverse the syntax tree recursively.
# The order should respect the order of the configuration file as it is read
# and written by humans (and the order in which it is parsed).
Traverse the syntax tree recursively.
The order should respect the order of the configuration file as it is read
and written by humans (and the order in which it is parsed).
Traverse the syntax tree recursively . The order should respect the order of the configuration file as it is read and written by humans ( and the order in which it is parsed ) .
def recurse(e, depth = 0, &block)
    r = block.call(e, depth)
    e.elements.each { |e| recurse(e, depth + 1, &block) } if r && e.elements
    nil
  end
def recurse ( e , depth = 0 , & block ) r = block . call ( e , depth ) e . elements . each { | e | recurse ( e , depth + 1 , & block ) } if r && e . elements nil end
Traverse the syntax tree recursively.
Traverse the syntax tree recursively .
e
<not_specific>
depth
<not_specific>
block
<not_specific>