Loading lib/jsduck/accessors.rb +3 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ module JsDuck :files => cfg[:files], :id => "method-" + name, :deprecated => cfg[:deprecated], :attributes => {}, :meta => cfg[:meta], } end Loading @@ -81,6 +82,7 @@ module JsDuck :files => cfg[:files], :id => "method-" + name, :deprecated => cfg[:deprecated], :attributes => {}, :meta => cfg[:meta] } end Loading Loading @@ -118,6 +120,7 @@ module JsDuck :files => cfg[:files], :id => "event-" + name, :deprecated => cfg[:deprecated], :attributes => {}, :meta => cfg[:meta] } end Loading lib/jsduck/aggregator.rb +5 −1 Original line number Diff line number Diff line Loading @@ -85,13 +85,17 @@ module JsDuck # Merges new class-doc into old one. def merge_classes(old, new) # Merge booleans [:extends, :singleton, :private, :protected].each do |tag| [:extends, :singleton, :private].each do |tag| old[tag] = old[tag] || new[tag] end # Merge arrays [:mixins, :alternateClassNames, :files].each do |tag| old[tag] = old[tag] + new[tag] end # Merge attribute hashes new[:attributes].each_pair do |name, value| old[:attributes][name] = old[:attributes][name] || value end # Merge hashes of arrays [:aliases, :meta].each do |tag| new[tag].each_pair do |key, contents| Loading lib/jsduck/app_exporter.rb +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ module JsDuck def compact_member(m) m_copy = {} [:name, :tagname, :owner, :protected, :static, :deprecated, :required, :template, :id].each do |key| [:name, :tagname, :owner, :static, :deprecated, :required, :attributes, :id].each do |key| m_copy[key] = m[key] end m_copy Loading lib/jsduck/class_formatter.rb +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ module JsDuck end def expandable?(m) m[:params] || (m[:properties] && m[:properties].length > 0) || m[:default] || m[:deprecated] || m[:template] m[:params] || (m[:properties] && m[:properties].length > 0) || m[:default] || m[:deprecated] || m[:attributes][:template] end def format_item(it, is_css_tag) Loading lib/jsduck/doc_parser.rb +16 −6 Original line number Diff line number Diff line Loading @@ -144,20 +144,21 @@ module JsDuck boolean_at_tag(/@inheritable/, :inheritable) elsif look(/@(private|ignore|hide)\b/) boolean_at_tag(/@(private|ignore|hide)/, :private) elsif look(/@protected\b/) boolean_at_tag(/@protected/, :protected) elsif look(/@accessor\b/) boolean_at_tag(/@accessor/, :accessor) elsif look(/@evented\b/) boolean_at_tag(/@evented/, :evented) elsif look(/@protected\b/) attribute_tag(/@protected/, :protected) elsif look(/@template\b/) boolean_at_tag(/@template/, :template) attribute_tag(/@template/, :template) elsif look(/@abstract\b/) attribute_tag(/@abstract\b/, :abstract) elsif look(/@readonly\b/) attribute_tag(/@readonly\b/, :readonly) elsif look(/@markdown\b/) # this is detected just to be ignored boolean_at_tag(/@markdown/, :markdown) elsif look(/@abstract\b/) # this is detected just to be ignored boolean_at_tag(/@abstract/, :abstract) elsif look(/@/) @input.scan(/@/) tag = @meta_tags_map[look(/\w+/)] Loading Loading @@ -369,6 +370,15 @@ module JsDuck skip_white end # Matches tag like @protected, @abstract, @readonly, @template # Creates :attribute tag with that name def attribute_tag(regex, attr_name) match(regex) add_tag(:attribute) @current_tag[:name] = attr_name skip_white end # matches {type} if possible and sets it on @current_tag def maybe_type skip_horiz_white Loading Loading
lib/jsduck/accessors.rb +3 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ module JsDuck :files => cfg[:files], :id => "method-" + name, :deprecated => cfg[:deprecated], :attributes => {}, :meta => cfg[:meta], } end Loading @@ -81,6 +82,7 @@ module JsDuck :files => cfg[:files], :id => "method-" + name, :deprecated => cfg[:deprecated], :attributes => {}, :meta => cfg[:meta] } end Loading Loading @@ -118,6 +120,7 @@ module JsDuck :files => cfg[:files], :id => "event-" + name, :deprecated => cfg[:deprecated], :attributes => {}, :meta => cfg[:meta] } end Loading
lib/jsduck/aggregator.rb +5 −1 Original line number Diff line number Diff line Loading @@ -85,13 +85,17 @@ module JsDuck # Merges new class-doc into old one. def merge_classes(old, new) # Merge booleans [:extends, :singleton, :private, :protected].each do |tag| [:extends, :singleton, :private].each do |tag| old[tag] = old[tag] || new[tag] end # Merge arrays [:mixins, :alternateClassNames, :files].each do |tag| old[tag] = old[tag] + new[tag] end # Merge attribute hashes new[:attributes].each_pair do |name, value| old[:attributes][name] = old[:attributes][name] || value end # Merge hashes of arrays [:aliases, :meta].each do |tag| new[tag].each_pair do |key, contents| Loading
lib/jsduck/app_exporter.rb +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ module JsDuck def compact_member(m) m_copy = {} [:name, :tagname, :owner, :protected, :static, :deprecated, :required, :template, :id].each do |key| [:name, :tagname, :owner, :static, :deprecated, :required, :attributes, :id].each do |key| m_copy[key] = m[key] end m_copy Loading
lib/jsduck/class_formatter.rb +1 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ module JsDuck end def expandable?(m) m[:params] || (m[:properties] && m[:properties].length > 0) || m[:default] || m[:deprecated] || m[:template] m[:params] || (m[:properties] && m[:properties].length > 0) || m[:default] || m[:deprecated] || m[:attributes][:template] end def format_item(it, is_css_tag) Loading
lib/jsduck/doc_parser.rb +16 −6 Original line number Diff line number Diff line Loading @@ -144,20 +144,21 @@ module JsDuck boolean_at_tag(/@inheritable/, :inheritable) elsif look(/@(private|ignore|hide)\b/) boolean_at_tag(/@(private|ignore|hide)/, :private) elsif look(/@protected\b/) boolean_at_tag(/@protected/, :protected) elsif look(/@accessor\b/) boolean_at_tag(/@accessor/, :accessor) elsif look(/@evented\b/) boolean_at_tag(/@evented/, :evented) elsif look(/@protected\b/) attribute_tag(/@protected/, :protected) elsif look(/@template\b/) boolean_at_tag(/@template/, :template) attribute_tag(/@template/, :template) elsif look(/@abstract\b/) attribute_tag(/@abstract\b/, :abstract) elsif look(/@readonly\b/) attribute_tag(/@readonly\b/, :readonly) elsif look(/@markdown\b/) # this is detected just to be ignored boolean_at_tag(/@markdown/, :markdown) elsif look(/@abstract\b/) # this is detected just to be ignored boolean_at_tag(/@abstract/, :abstract) elsif look(/@/) @input.scan(/@/) tag = @meta_tags_map[look(/\w+/)] Loading Loading @@ -369,6 +370,15 @@ module JsDuck skip_white end # Matches tag like @protected, @abstract, @readonly, @template # Creates :attribute tag with that name def attribute_tag(regex, attr_name) match(regex) add_tag(:attribute) @current_tag[:name] = attr_name skip_white end # matches {type} if possible and sets it on @current_tag def maybe_type skip_horiz_white Loading