def expand(docset)
      docset[:comment] = @doc_parser.parse(docset[:comment], @filename, docset[:linenr])
      docset[:doc_map] = Doc::Map.build(docset[:comment])
      docset[:tagname] = BaseType.detect(docset[:doc_map], docset[:code])

      if docset[:tagname] == :class
        # expand class into several docsets, and rebuild doc-maps for all of them.
        @class_doc_expander.expand(docset).map do |ds|
          ds[:doc_map] = Doc::Map.build(ds[:comment])
          ds
        end
      else
        docset
      end
    end
def expand(docset)
      docset[:comment] = @doc_parser.parse(docset[:comment], @filename, docset[:linenr])
      docset[:doc_map] = Doc::Map.build(docset[:comment])
      docset[:tagname] = BaseType.detect(docset[:doc_map], docset[:code])

      if docset[:tagname] == :class
        # expand class into several docsets, and rebuild doc-maps for all of them.
        @class_doc_expander.expand(docset).map do |ds|
          ds[:doc_map] = Doc::Map.build(ds[:comment])
          ds
        end
      else
        docset
      end
    end
Parses the docs, detects tagname and expands class docset