def expand_comment(docset)
      groups = {
        :class => [],
        :cfg => [],
        :constructor => [],
      }

      # By default everything goes to :class group
      group_name = :class

      docset[:comment].each do |tag|
        tagname = tag[:tagname]

        if tagname == :cfg || tagname == :constructor
          group_name = tagname
          if tagname == :cfg && (tag[:name] !~ /\./ || groups[:cfg].length == 0)
            groups[:cfg] << []
          end
        end

        if tagname == :aliases
          # For backwards compatibility allow @xtype after @constructor
          groups[:class] << tag
        elsif group_name == :cfg
          groups[:cfg].last << tag
        else
          groups[group_name] << tag
        end
      end

      groups_to_docsets(groups, docset)
    end
def expand_comment(docset)
      groups = {
        :class => [],
        :cfg => [],
        :constructor => [],
      }

      # By default everything goes to :class group
      group_name = :class

      docset[:comment].each do |tag|
        tagname = tag[:tagname]

        if tagname == :cfg || tagname == :constructor
          group_name = tagname
          if tagname == :cfg && (tag[:name] !~ /\./ || groups[:cfg].length == 0)
            groups[:cfg] << []
          end
        end

        if tagname == :aliases
          # For backwards compatibility allow @xtype after @constructor
          groups[:class] << tag
        elsif group_name == :cfg
          groups[:cfg].last << tag
        else
          groups[group_name] << tag
        end
      end

      groups_to_docsets(groups, docset)
    end
Handles old syntax where configs and constructor are part of class
 doc-comment.

 Gathers all tags until first @cfg or @constructor into the first
 bare :class group.  We have a special case for @xtype which in
 ExtJS comments often appears after @constructor - so we
 explicitly place it into :class group.

 Then gathers each @cfg and tags following it into :cfg group, so
 that it becomes array of arrays of tags.  This is to allow some
 configs to be marked with @private or whatever else.

 Finally gathers tags after @constructor into its group.