Sha256: 4c7c85ab4874201cbc8a12cb047ab0bc3a621129ab80dac7bca74a03220066fa

Contents?: true

Size: 469 Bytes

Versions: 12

Compression:

Stored size: 469 Bytes

Contents

require_relative 'branch'

module DeepCover
  class Node
    class ShortCircuit < Node
      include Branch
      has_tracker :conditional
      has_child first: Node
      has_child conditional: Node, flow_entry_count: :conditional_tracker_hits,
        rewrite: '((%{conditional_tracker};%{node}))'

      def branches
        [
          conditional,
          TrivialBranch.new(first, conditional)
        ]
      end
    end

    And = Or = ShortCircuit
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
deep-cover-0.1.12 lib/deep_cover/node/short_circuit.rb
deep-cover-0.1.11 lib/deep_cover/node/short_circuit.rb
deep-cover-0.1.10 lib/deep_cover/node/short_circuit.rb
deep-cover-0.1.9 lib/deep_cover/node/short_circuit.rb
deep-cover-0.1.8 lib/deep_cover/node/short_circuit.rb
deep-cover-0.1.7 lib/deep_cover/node/short_circuit.rb
deep-cover-0.1.6 lib/deep_cover/node/short_circuit.rb
deep-cover-0.1.5 lib/deep_cover/node/short_circuit.rb
deep-cover-0.1.4 lib/deep_cover/node/short_circuit.rb
deep-cover-0.1.3 lib/deep_cover/node/short_circuit.rb
deep-cover-0.1.2 lib/deep_cover/node/short_circuit.rb
deep-cover-0.1.1 lib/deep_cover/node/boolean.rb