def merge(docset, filename="", linenr=0)
      docs = docset[:comment]
      code = process_code(docset[:tagname], docset[:code])

      h = {
        :tagname => docset[:tagname],
        :name => docs[:name] || code[:name] || "",
        :autodetected => code[:autodetected] || {},
        :files => [{:filename => filename, :linenr => linenr}],
      }

      general_merge(h, docs, code)
      invoke_merge_in_member_tag(h, docs, code)

      # Needs to be calculated last, as it relies on the existance of
      # :name, :static and :tagname fields.
      h[:id] = JsDuck::Class.member_id(h)

      h
    end
def merge(docset, filename="", linenr=0)
      docs = docset[:comment]
      code = process_code(docset[:tagname], docset[:code])

      h = {
        :tagname => docset[:tagname],
        :name => docs[:name] || code[:name] || "",
        :autodetected => code[:autodetected] || {},
        :files => [{:filename => filename, :linenr => linenr}],
      }

      general_merge(h, docs, code)
      invoke_merge_in_member_tag(h, docs, code)

      # Needs to be calculated last, as it relies on the existance of
      # :name, :static and :tagname fields.
      h[:id] = JsDuck::Class.member_id(h)

      h
    end
Takes a docset and merges the :comment and :code inside it,
 producing hash as a result.