Loading lib/jsduck/doc/ast.rb +0 −7 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ module JsDuck return add_shared({ :tagname => :method, :doc => detect_doc(:method, doc_map), :params => detect_params(doc_map), :return => detect_return(doc_map), }, doc_map) end Loading @@ -59,7 +58,6 @@ module JsDuck return add_shared({ :tagname => :event, :doc => detect_doc(:event, doc_map), :params => detect_params(doc_map), }, doc_map) end Loading Loading @@ -100,7 +98,6 @@ module JsDuck :tagname => :css_mixin, :name => detect_name(:css_mixin, doc_map), :doc => detect_doc(:css_mixin, doc_map), :params => detect_params(doc_map), }, doc_map) end Loading Loading @@ -142,10 +139,6 @@ module JsDuck doc_map[:cfg] && doc_map[:cfg].first[:optional] == false end def detect_params(doc_map) nest_properties(doc_map[:param] || []) end def detect_subproperties(tagname, docs) prop_docs = docs.find_all {|tag| tag[:tagname] == tagname} prop_docs.length > 0 ? nest_properties(prop_docs)[0][:properties] : [] Loading lib/jsduck/tag/param.rb +8 −0 Original line number Diff line number Diff line require "jsduck/tag/tag" require "jsduck/doc/subproperties" module JsDuck::Tag class Param < Tag def initialize @pattern = "param" @key = :param end # @param {Type} [name=default] (optional) ... Loading @@ -17,5 +19,11 @@ module JsDuck::Tag def parse_optional(p) p.hw.match(/\(optional\)/i) end def process_doc(h, tags) items, warnings = JsDuck::Doc::Subproperties.nest(tags) # warnings.each {|msg| JsDuck::Logger.warn(:subproperty, msg, @filename, @linenr) } h[:params] = items end end end Loading
lib/jsduck/doc/ast.rb +0 −7 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ module JsDuck return add_shared({ :tagname => :method, :doc => detect_doc(:method, doc_map), :params => detect_params(doc_map), :return => detect_return(doc_map), }, doc_map) end Loading @@ -59,7 +58,6 @@ module JsDuck return add_shared({ :tagname => :event, :doc => detect_doc(:event, doc_map), :params => detect_params(doc_map), }, doc_map) end Loading Loading @@ -100,7 +98,6 @@ module JsDuck :tagname => :css_mixin, :name => detect_name(:css_mixin, doc_map), :doc => detect_doc(:css_mixin, doc_map), :params => detect_params(doc_map), }, doc_map) end Loading Loading @@ -142,10 +139,6 @@ module JsDuck doc_map[:cfg] && doc_map[:cfg].first[:optional] == false end def detect_params(doc_map) nest_properties(doc_map[:param] || []) end def detect_subproperties(tagname, docs) prop_docs = docs.find_all {|tag| tag[:tagname] == tagname} prop_docs.length > 0 ? nest_properties(prop_docs)[0][:properties] : [] Loading
lib/jsduck/tag/param.rb +8 −0 Original line number Diff line number Diff line require "jsduck/tag/tag" require "jsduck/doc/subproperties" module JsDuck::Tag class Param < Tag def initialize @pattern = "param" @key = :param end # @param {Type} [name=default] (optional) ... Loading @@ -17,5 +19,11 @@ module JsDuck::Tag def parse_optional(p) p.hw.match(/\(optional\)/i) end def process_doc(h, tags) items, warnings = JsDuck::Doc::Subproperties.nest(tags) # warnings.each {|msg| JsDuck::Logger.warn(:subproperty, msg, @filename, @linenr) } h[:params] = items end end end