Sha256: 686551620efe635ec252a6152305ef4026372aeb8482567399a1d37f2fdabf3b

Contents?: true

Size: 555 Bytes

Versions: 18

Compression:

Stored size: 555 Bytes

Contents

# frozen_string_literal: true

module Unparser
  class Emitter
    # Emitter for flip flops
    class FlipFlop < self
      MAP = {
        iflipflop: '..',
        eflipflop: '...'
      }.freeze

      SYMBOLS = {
        eflipflop: :tDOT3,
        iflipflop: :tDOT2
      }.freeze

      def symbol_name
        true
      end

      handle(*MAP.keys)

      children :left, :right

    private

      def dispatch
        visit(left)
        write(MAP.fetch(node.type))
        visit(right)
      end
    end # FlipFLop
  end # Emitter
end # Unparser

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
unparser-0.6.8 lib/unparser/emitter/flipflop.rb
devcycle-ruby-server-sdk-2.0.0 vendor/bundle/ruby/3.0.0/gems/unparser-0.6.7/lib/unparser/emitter/flipflop.rb
unparser-0.6.7 lib/unparser/emitter/flipflop.rb
unparser-0.6.6 lib/unparser/emitter/flipflop.rb
unparser-0.6.5 lib/unparser/emitter/flipflop.rb
unparser-0.6.4 lib/unparser/emitter/flipflop.rb
unparser-0.6.3 lib/unparser/emitter/flipflop.rb
unparser-0.6.2 lib/unparser/emitter/flipflop.rb
unparser-0.6.1 lib/unparser/emitter/flipflop.rb
unparser-0.6.0 lib/unparser/emitter/flipflop.rb
unparser-0.5.7 lib/unparser/emitter/flipflop.rb
unparser-0.5.6 lib/unparser/emitter/flipflop.rb
unparser-0.5.5 lib/unparser/emitter/flipflop.rb
unparser-0.5.4 lib/unparser/emitter/flipflop.rb
unparser-0.5.3 lib/unparser/emitter/flipflop.rb
unparser-0.5.2 lib/unparser/emitter/flipflop.rb
unparser-0.5.1 lib/unparser/emitter/flipflop.rb
unparser-0.5.0 lib/unparser/emitter/flipflop.rb