Class: ASTProcess
- Inherits:
-
Object
- Object
- ASTProcess
- Defined in:
- lib/normalize_ast.rb
Instance Method Summary collapse
Instance Method Details
#store_nodes(ast, &block) ⇒ Object
97 98 99 100 101 102 103 104 105 |
# File 'lib/normalize_ast.rb', line 97 def store_nodes(ast, &block) if ast.is_a? Parser::AST::Node type = ast.type yield ast, type ast.children.each do |child| store_nodes child, &block end end end |