diff --git a/lib/jsduck/doc/parser.rb b/lib/jsduck/doc/parser.rb index 297402eb10970fc5f3cdbd5beaee3ecc28671062..7a1687e18c80e80fae66d2a076b1c516ff04d7dc 100644 --- a/lib/jsduck/doc/parser.rb +++ b/lib/jsduck/doc/parser.rb @@ -85,7 +85,7 @@ module JsDuck elsif tag = TagRegistry.get_by_pattern(name) match(/\w+/) - tags = tag.parse(self) + tags = tag.parse_doc(self) if tags.is_a?(Hash) add_tag(tags) elsif tags.is_a?(Array) diff --git a/lib/jsduck/tag/alias.rb b/lib/jsduck/tag/alias.rb index 0e0892c58dc9a8c357221e94558545a9ef229a8d..28026262ad782d5d40d656e9b948b626d12e1d30 100644 --- a/lib/jsduck/tag/alias.rb +++ b/lib/jsduck/tag/alias.rb @@ -13,7 +13,7 @@ module JsDuck::Tag # For backwards compatibility decide whether the @alias was used # as @inheritdoc (@alias used to have the meaning of @inheritdoc # before) or as a real Ext4 style alias definition. - def parse(p) + def parse_doc(p) if p.look(/\s+([\w.]+)?#\w+/) parse_as_inheritdoc(p) else diff --git a/lib/jsduck/tag/aside.rb b/lib/jsduck/tag/aside.rb index 9fe49339dacd139c0c5882b7b8bb354b18cbb962..8d44753c8f1316cda7845d0a00e7996437707f5b 100644 --- a/lib/jsduck/tag/aside.rb +++ b/lib/jsduck/tag/aside.rb @@ -9,7 +9,7 @@ module JsDuck::Tag @html_position = :top end - def parse(p) + def parse_doc(p) { :tagname => :aside, :type => aside_type(p), diff --git a/lib/jsduck/tag/author.rb b/lib/jsduck/tag/author.rb index 409abec0ac8d4f172b3ebe6669ef38e60b55ccdb..c30718fa3584940ace02448d26dfc51b5b55eade 100644 --- a/lib/jsduck/tag/author.rb +++ b/lib/jsduck/tag/author.rb @@ -8,7 +8,7 @@ module JsDuck::Tag # @author Name of Author ... # Everything until the end of line gets just ignored. - def parse(p) + def parse_doc(p) p.match(/.*$/) end end diff --git a/lib/jsduck/tag/boolean_tag.rb b/lib/jsduck/tag/boolean_tag.rb index 068f7c7c19dd1abe9825c938bbca26f37d05c878..8267629353f830f75b1724c5cb81bebf0b8341e8 100644 --- a/lib/jsduck/tag/boolean_tag.rb +++ b/lib/jsduck/tag/boolean_tag.rb @@ -12,7 +12,7 @@ module JsDuck::Tag end # Parses just the name of the tag. - def parse(p) + def parse_doc(p) {:tagname => @key} end diff --git a/lib/jsduck/tag/cfg.rb b/lib/jsduck/tag/cfg.rb index addcefa6e420018b799c6159f605dca994b4a0b2..e5741334b486484c5795e1ef7ab636c82f4ce97f 100644 --- a/lib/jsduck/tag/cfg.rb +++ b/lib/jsduck/tag/cfg.rb @@ -10,7 +10,7 @@ module JsDuck::Tag end # @cfg {Type} [name=default] (required) ... - def parse(p) + def parse_doc(p) tag = p.standard_tag({:tagname => :cfg, :type => true, :name => true}) tag[:optional] = false if parse_required(p) tag[:doc] = :multiline diff --git a/lib/jsduck/tag/class.rb b/lib/jsduck/tag/class.rb index f192d3756081b8904bdcece782f64983baf24e39..0f51e034f719c46cab8b1a5e101f8f60d2c08d4f 100644 --- a/lib/jsduck/tag/class.rb +++ b/lib/jsduck/tag/class.rb @@ -8,7 +8,7 @@ module JsDuck::Tag end # @class name - def parse(p) + def parse_doc(p) { :tagname => :class, :name => p.hw.ident_chain, diff --git a/lib/jsduck/tag/class_list_tag.rb b/lib/jsduck/tag/class_list_tag.rb index 4cf1b43f0185a0536b246fa4b3ed17c026be679a..ab1a65ce98556eda8638b465f4f3c3b6f866b7ab 100644 --- a/lib/jsduck/tag/class_list_tag.rb +++ b/lib/jsduck/tag/class_list_tag.rb @@ -8,11 +8,11 @@ module JsDuck::Tag # @tagname classname1 classname2 ... # # Subclasses need to define the @patterns and @key fields for the - # #parse and #process_doc methods to work. Plus @ext_define_pattern + # #parse_doc and #process_doc methods to work. Plus @ext_define_pattern # and @ext_define_default for the #parse_ext_define to work. # class ClassListTag < Tag - def parse(p) + def parse_doc(p) { :tagname => @key, :classes => classname_list(p), diff --git a/lib/jsduck/tag/constructor.rb b/lib/jsduck/tag/constructor.rb index 02470b0827b3d415a2209efbc5c96c80d801e010..e459e1fb9ab64d4d4fc6532ef2c2dd452b0d81f7 100644 --- a/lib/jsduck/tag/constructor.rb +++ b/lib/jsduck/tag/constructor.rb @@ -8,7 +8,7 @@ module JsDuck::Tag end # @constructor - def parse(p) + def parse_doc(p) {:tagname => :constructor, :doc => :multiline} end diff --git a/lib/jsduck/tag/css_var.rb b/lib/jsduck/tag/css_var.rb index 1a001a043b3ef9cfd34185d759b18fcdaff8605a..630e1ac92fbf8dab87e79fd0fd437a47cffbea35 100644 --- a/lib/jsduck/tag/css_var.rb +++ b/lib/jsduck/tag/css_var.rb @@ -9,7 +9,7 @@ module JsDuck::Tag end # @var {Type} [name=default] ... - def parse(p) + def parse_doc(p) p.standard_tag({:tagname => :css_var, :type => true, :name => true}) end diff --git a/lib/jsduck/tag/deprecated_tag.rb b/lib/jsduck/tag/deprecated_tag.rb index a3a873e966c9c4da6c245fc95ce93d2d9fd61161..4ac1adc5c4fd212e364ea33ef700cf6c2df79a54 100644 --- a/lib/jsduck/tag/deprecated_tag.rb +++ b/lib/jsduck/tag/deprecated_tag.rb @@ -13,7 +13,7 @@ module JsDuck::Tag end end - def parse(p) + def parse_doc(p) { :tagname => @key, :version => p.hw.match(/[0-9.]+/), diff --git a/lib/jsduck/tag/enum.rb b/lib/jsduck/tag/enum.rb index 3905f7280b9c002459f95d52fed6ea1ef44def28..134e3bb1ce27048347b27062b31513b97181d3f1 100644 --- a/lib/jsduck/tag/enum.rb +++ b/lib/jsduck/tag/enum.rb @@ -8,7 +8,7 @@ module JsDuck::Tag end # @enum {Type} [name=default] ... - def parse(p) + def parse_doc(p) enum = p.standard_tag({:tagname => :enum, :type => true, :name => true}) # @enum is a special case of class, so we also generate a class diff --git a/lib/jsduck/tag/event.rb b/lib/jsduck/tag/event.rb index dd2ffae0865441848054883896f71dff73ac638c..993d890f4c1e046f5b60fe44733f0043a626f96b 100644 --- a/lib/jsduck/tag/event.rb +++ b/lib/jsduck/tag/event.rb @@ -9,7 +9,7 @@ module JsDuck::Tag end # @event name ... - def parse(p) + def parse_doc(p) { :tagname => :event, :name => p.hw.ident, diff --git a/lib/jsduck/tag/extends.rb b/lib/jsduck/tag/extends.rb index 57edd9b93944acb0ecb6ec2737bf344ff6b4613c..460e92ebe65e7fc9ee85da566513f2a29d6e3c9d 100644 --- a/lib/jsduck/tag/extends.rb +++ b/lib/jsduck/tag/extends.rb @@ -11,7 +11,7 @@ module JsDuck::Tag end # @extends classname - def parse(p) + def parse_doc(p) { :tagname => :extends, :extends => p.hw.ident_chain, diff --git a/lib/jsduck/tag/ftype.rb b/lib/jsduck/tag/ftype.rb index 20de2297ae68d0e8fd613bcd1b7f24b4b429c4a8..0fbb199f56f1edaec27c96c757b5acb0a45386ff 100644 --- a/lib/jsduck/tag/ftype.rb +++ b/lib/jsduck/tag/ftype.rb @@ -7,7 +7,7 @@ module JsDuck::Tag end # @ftype name - def parse(p) + def parse_doc(p) { :tagname => :aliases, :name => parse_alias_shorthand(p, "feature") diff --git a/lib/jsduck/tag/inheritdoc.rb b/lib/jsduck/tag/inheritdoc.rb index 5f0a5dd7fd04e307b4289574e7d27aab159ce109..2feac7863abdc733edc6e83f72146b07f79bf722 100644 --- a/lib/jsduck/tag/inheritdoc.rb +++ b/lib/jsduck/tag/inheritdoc.rb @@ -9,7 +9,7 @@ module JsDuck::Tag end # @inheritdoc class.name#static-type-member - def parse(p) + def parse_doc(p) parse_as_inheritdoc(p) end diff --git a/lib/jsduck/tag/markdown.rb b/lib/jsduck/tag/markdown.rb index d78b2c9bd5244d72170fed569638557ac1bc5166..d713deb25b3d3aee311119146980c312cee59b7e 100644 --- a/lib/jsduck/tag/markdown.rb +++ b/lib/jsduck/tag/markdown.rb @@ -7,7 +7,7 @@ module JsDuck::Tag end # @markdown - def parse(p) + def parse_doc(p) # Just completely ignore this tag. end end diff --git a/lib/jsduck/tag/member.rb b/lib/jsduck/tag/member.rb index e861a02e62ae3e4512a6641400861400ac2cd656..f8f9659237f2612a427be4a005420d32a100f444 100644 --- a/lib/jsduck/tag/member.rb +++ b/lib/jsduck/tag/member.rb @@ -10,7 +10,7 @@ module JsDuck::Tag end # @member classname - def parse(p) + def parse_doc(p) { :tagname => :owner, :owner => p.hw.ident_chain, diff --git a/lib/jsduck/tag/method.rb b/lib/jsduck/tag/method.rb index 098039125928acf4aab3486e862b03badd9fd80e..8db7ac4b8fac763cfb4a72f7beffb2b7a8f80896 100644 --- a/lib/jsduck/tag/method.rb +++ b/lib/jsduck/tag/method.rb @@ -10,7 +10,7 @@ module JsDuck::Tag end # @method name ... - def parse(p) + def parse_doc(p) { :tagname => :method, :name => p.hw.ident, diff --git a/lib/jsduck/tag/override.rb b/lib/jsduck/tag/override.rb index 55870ca311acbc9c4f4e158e8aa7c22efcf508a0..858a3afda16bb9b35787d9a2bd70dba49129994e 100644 --- a/lib/jsduck/tag/override.rb +++ b/lib/jsduck/tag/override.rb @@ -10,7 +10,7 @@ module JsDuck::Tag end # @override nameOfOverride - def parse(p) + def parse_doc(p) if classname = p.hw.ident_chain { :tagname => :override, diff --git a/lib/jsduck/tag/param.rb b/lib/jsduck/tag/param.rb index 6cc07946f68616212105fc54658ec2c5729883d6..502321b07957227a5c3ca027d9cd8fcd1e2f1fc6 100644 --- a/lib/jsduck/tag/param.rb +++ b/lib/jsduck/tag/param.rb @@ -9,7 +9,7 @@ module JsDuck::Tag end # @param {Type} [name=default] (optional) ... - def parse(p) + def parse_doc(p) tag = p.standard_tag({:tagname => :param, :type => true, :name => true}) tag[:optional] = true if parse_optional(p) tag[:doc] = :multiline diff --git a/lib/jsduck/tag/preventable.rb b/lib/jsduck/tag/preventable.rb index 6b48486522fe0edb557063287687bf3b7a6aca69..36e1126ae7f62fc83c5d15958cf4c8d4ebd6cb32 100644 --- a/lib/jsduck/tag/preventable.rb +++ b/lib/jsduck/tag/preventable.rb @@ -14,7 +14,7 @@ module JsDuck::Tag # @preventable is optionally followed by some method name, but we # don't document it. - def parse(p) + def parse_doc(p) p.match(/.*$/) {:tagname => :preventable} end diff --git a/lib/jsduck/tag/property.rb b/lib/jsduck/tag/property.rb index 37dbf39a8aa8714947d98a257bcd87fb4f60953c..7351472ac2fbeb25139d8fcbe4a748ab05f7cc14 100644 --- a/lib/jsduck/tag/property.rb +++ b/lib/jsduck/tag/property.rb @@ -10,7 +10,7 @@ module JsDuck::Tag end # @property {Type} [name=default] ... - def parse(p) + def parse_doc(p) tag = p.standard_tag({:tagname => :property, :type => true, :name => true}) tag[:doc] = :multiline tag diff --git a/lib/jsduck/tag/ptype.rb b/lib/jsduck/tag/ptype.rb index 19937d4f04c907b0c1a0545bf23eaad34cea64f1..dcc8d314a1319acab2983795e370ce7e376824fb 100644 --- a/lib/jsduck/tag/ptype.rb +++ b/lib/jsduck/tag/ptype.rb @@ -7,7 +7,7 @@ module JsDuck::Tag end # @ptype name - def parse(p) + def parse_doc(p) { :tagname => :aliases, :name => parse_alias_shorthand(p, "plugin") diff --git a/lib/jsduck/tag/return.rb b/lib/jsduck/tag/return.rb index 6f64547fd8a5a0215648e2aff1be4557d92505f2..c58cc3c0f9247e3317f60b07f9e9e95b2121e89e 100644 --- a/lib/jsduck/tag/return.rb +++ b/lib/jsduck/tag/return.rb @@ -9,7 +9,7 @@ module JsDuck::Tag end # @return {Type} return.name ... - def parse(p) + def parse_doc(p) tag = p.standard_tag({:tagname => :return, :type => true}) tag[:name] = subproperty_name(p) tag[:doc] = :multiline diff --git a/lib/jsduck/tag/since.rb b/lib/jsduck/tag/since.rb index 5c1575256350ede10a20da4baf6566dd8b5b761f..7fa6b8a09ef91975c6137f647deb9885beb8410d 100644 --- a/lib/jsduck/tag/since.rb +++ b/lib/jsduck/tag/since.rb @@ -9,7 +9,7 @@ module JsDuck::Tag @html_position = :bottom end - def parse(p) + def parse_doc(p) { :tagname => :since, :version => p.hw.match(/.*$/).strip, diff --git a/lib/jsduck/tag/tag.rb b/lib/jsduck/tag/tag.rb index ea491af49a4d850f2e839deffb2d0de2174b74b9..3e9448c8bc21b2e73277f637b9df575b12376bbe 100644 --- a/lib/jsduck/tag/tag.rb +++ b/lib/jsduck/tag/tag.rb @@ -23,7 +23,7 @@ module JsDuck::Tag # the documentation following this tag will get added to the :doc # field of the tag and will later be accessible in #process_doc # method. - def parse(p) + def parse_doc(p) end # Defines the symbol under which the tag data is stored in final @@ -31,7 +31,7 @@ module JsDuck::Tag attr_reader :key # Gets called with the resulting class/member hash and array of - # @tag data that was generated by #parse. Also a hash with + # @tag data that was generated by #parse_doc. Also a hash with # position information {:filename, :linenr} is passed in. # # It can then add a new field to the class/member hash or diff --git a/lib/jsduck/tag/throws.rb b/lib/jsduck/tag/throws.rb index 5bfa9e30701e5e29c335997b22fc7eeb2f11b923..89d3fd33edcfce93902f0528ffddde4f29e85e64 100644 --- a/lib/jsduck/tag/throws.rb +++ b/lib/jsduck/tag/throws.rb @@ -8,7 +8,7 @@ module JsDuck::Tag end # @throws {Type} ... - def parse(p) + def parse_doc(p) tag = p.standard_tag({:tagname => :throws, :type => true}) tag[:doc] = :multiline tag diff --git a/lib/jsduck/tag/type.rb b/lib/jsduck/tag/type.rb index d0544ad8d866969b82059ff30b4303571cd99f09..4713219c8ba4ab5ad4942bbc944278941ad1c7f8 100644 --- a/lib/jsduck/tag/type.rb +++ b/lib/jsduck/tag/type.rb @@ -12,7 +12,7 @@ module JsDuck::Tag # The presence of @type implies that we are dealing with property. # ext-doc allows type name to be either inside curly braces or # without them at all. - def parse(p) + def parse_doc(p) tag = p.standard_tag({:tagname => :type, :type => true}) tag[:type] = curlyless_type(p) unless tag[:type] tag diff --git a/lib/jsduck/tag/xtype.rb b/lib/jsduck/tag/xtype.rb index 7108ee9ffd086e383de3da1cd736011fd81532a4..a00ee1fc9df324cb89872ca07a5773a05ebc4212 100644 --- a/lib/jsduck/tag/xtype.rb +++ b/lib/jsduck/tag/xtype.rb @@ -9,7 +9,7 @@ module JsDuck::Tag end # @xtype name - def parse(p) + def parse_doc(p) { :tagname => :aliases, :name => parse_alias_shorthand(p, "widget")