diff --git a/lib/jsduck/doc_ast.rb b/lib/jsduck/doc_ast.rb index 11a9eb32cbc64d707852e741849d8b0cf19be470..87c99fb92120dce0953e04cdb4c83575755e9847 100644 --- a/lib/jsduck/doc_ast.rb +++ b/lib/jsduck/doc_ast.rb @@ -43,7 +43,6 @@ module JsDuck :tagname => :class, :name => detect_name(:class, doc_map), :doc => detect_doc(docs), - :extends => detect_extends(doc_map), :mixins => detect_list(:mixins, doc_map), :alternateClassNames => detect_list(:alternateClassNames, doc_map), :aliases => detect_aliases(doc_map), @@ -155,10 +154,6 @@ module JsDuck extract(doc_map, tagname, :type) || extract(doc_map, :type, :type) end - def detect_extends(doc_map) - extract(doc_map, :extends, :extends) - end - def detect_default(tagname, doc_map) extract(doc_map, tagname, :default) end diff --git a/lib/jsduck/tag/extends.rb b/lib/jsduck/tag/extends.rb index 52e124130b8f79796fb29b71c868a24a8d4e1440..1bd8d5e40a24ca9afc9157a8da110720297f7c94 100644 --- a/lib/jsduck/tag/extends.rb +++ b/lib/jsduck/tag/extends.rb @@ -5,6 +5,7 @@ module JsDuck::Tag class Extends < Tag def initialize @pattern = ["extend", "extends"] + @key = :extends @ext_define_pattern = "extend" @ext_define_default = {:extends => "Ext.Base"} end @@ -15,6 +16,10 @@ module JsDuck::Tag p.maybe_ident_chain(:extends) end + def process_doc(tags) + tags[0][:extends] + end + def parse_ext_define(cls, ast) cls[:extends] = JsDuck::AstUtils.make_string(ast) end