Skip to content

Commit

Permalink
Merge 6a35d55 into 7ca36c0
Browse files Browse the repository at this point in the history
  • Loading branch information
flyerhzm committed Feb 20, 2021
2 parents 7ca36c0 + 6a35d55 commit ccbe989
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/synvert/core/node_ext.rb
Expand Up @@ -321,11 +321,11 @@ def line
#
# @yield [child] Gives a child node.
# @yieldparam child [Parser::AST::Node] child node
def recursive_children
def recursive_children(&block)
children.each do |child|
if Parser::AST::Node === child
yield child
child.recursive_children { |c| yield c }
child.recursive_children(&block)
end
end
end
Expand Down

0 comments on commit ccbe989

Please sign in to comment.