Sha256: 6794187fd0cb0d1ee4bd517eba3525470ab6d592665e6a8e3986f1970ade4de4

Contents?: true

Size: 594 Bytes

Versions: 14

Compression:

Stored size: 594 Bytes

Contents

module DeepCover
  class Node::Root < Node
    has_tracker :root
    has_child main: Node,
              can_be_empty: -> { ::Parser::Source::Range.new(covered_code.buffer, 0, 0) },
              is_statement: true,
              rewrite: -> {
                "#{covered_code.trackers_setup_source};%{root_tracker};%{local}=nil;%{node}"
              }
    attr_reader :covered_code
    alias_method :flow_entry_count, :root_tracker_hits

    def initialize(child_ast, covered_code)
      @covered_code = covered_code
      super(nil, parent: nil, base_children: [child_ast])
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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