Sha256: 3c35717bc056cc6df33dfc720028d1fab383691d1e1b180098f38fd19378abdc

Contents?: true

Size: 479 Bytes

Versions: 3

Compression:

Stored size: 479 Bytes

Contents

module Unparser
  class Emitter
    # Emitter for next nodes
    class Next < self

      handle :next

    private

      # Perform dispatch
      #
      # @return [undefined]
      #
      # @api private
      #
      def dispatch
        maybe_parentheses(parent_type == :or || parent_type == :and) do
          write(K_NEXT)
          return if children.empty?
          visit_parentheses(children.first)
        end
      end

    end # Next
  end # Emitter
end # Unparser

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
unparser-0.1.3 lib/unparser/emitter/next.rb
unparser-0.1.2 lib/unparser/emitter/next.rb
unparser-0.1.1 lib/unparser/emitter/next.rb