Sha256: d142a6697c3417dcdae2c1d6eef58822dbf50a63bcfee93b5d8cc0c488cd9d2d

Contents?: true

Size: 472 Bytes

Versions: 2

Compression:

Stored size: 472 Bytes

Contents

module Simplabs

  module Excellent

    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.is_a?(Sexp) then
      		    child.accept(self)
    		    end
  		    end
    	  end

      end

    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simplabs-excellent-1.0.0 lib/simplabs/excellent/core/iterator_visitor.rb
simplabs-excellent-1.0.1 lib/simplabs/excellent/core/iterator_visitor.rb