Sha256: 6f41387b84ad6241e4b8393d17df41249580e41ff659c229c220de3b143807a5

Contents?: true

Size: 416 Bytes

Versions: 11

Compression:

Stored size: 416 Bytes

Contents

module Roodi
  module Core
    class IteratorVisitor
    	def initialize(payload)
      	@payload = payload
    	end
	
    	def visit(visited)
    		visited.accept(@payload)
    		visitable_nodes = visited.is_language_node? ? visited.sexp_body : visited
    		visitable_nodes.each do |child| 
    		  if child.class == VisitableSexp then
      		  child.accept(self)
    		  end
  		  end
    	end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
roodi-1.1.0 lib/roodi/core/iterator_visitor.rb
roodi-0.5 lib/roodi/core/iterator_visitor.rb
roodi-1.1.1 lib/roodi/core/iterator_visitor.rb
roodi-1.3.0 lib/roodi/core/iterator_visitor.rb
roodi-1.3.7 lib/roodi/core/iterator_visitor.rb
roodi-1.3.3 lib/roodi/core/iterator_visitor.rb
roodi-1.3.5 lib/roodi/core/iterator_visitor.rb
roodi-1.3.6 lib/roodi/core/iterator_visitor.rb
roodi-1.2.0 lib/roodi/core/iterator_visitor.rb
roodi-1.3.2 lib/roodi/core/iterator_visitor.rb
roodi-1.3.4 lib/roodi/core/iterator_visitor.rb