Loading lib/jsduck/builtins/type.rb 0 → 100644 +27 −0 Original line number Diff line number Diff line require "jsduck/builtins/tag" module JsDuck::Builtins class Type < Tag def initialize @pattern = "type" end # matches @type {type} or @type type # # 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) p.add_tag(:type) p.maybe_type maybe_curlyless_type(p) unless p.current_tag[:type] end def maybe_curlyless_type(p) if p.look(/\S/) p.current_tag[:type] = p.match(/\S+/) end end end end lib/jsduck/doc_parser.rb +0 −14 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ module JsDuck "ftype" => [:at_xtype, "feature"], "ptype" => [:at_xtype, "plugin"], "type" => [:at_type], "inheritdoc" => [:at_inheritdoc], "inheritDoc" => [:at_inheritdoc], "alias" => [:at_alias_or_inheritdoc], Loading Loading @@ -196,19 +195,6 @@ module JsDuck # Routines for parsing of concrete tags... # # matches @type {type} or @type type # # 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 at_type add_tag(:type) maybe_type if !@current_tag[:type] && look(/\S/) @current_tag[:type] = match(/\S+/) end end # matches @xtype/ptype/ftype/... name def at_xtype(namespace) add_tag(:alias) Loading Loading
lib/jsduck/builtins/type.rb 0 → 100644 +27 −0 Original line number Diff line number Diff line require "jsduck/builtins/tag" module JsDuck::Builtins class Type < Tag def initialize @pattern = "type" end # matches @type {type} or @type type # # 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) p.add_tag(:type) p.maybe_type maybe_curlyless_type(p) unless p.current_tag[:type] end def maybe_curlyless_type(p) if p.look(/\S/) p.current_tag[:type] = p.match(/\S+/) end end end end
lib/jsduck/doc_parser.rb +0 −14 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ module JsDuck "ftype" => [:at_xtype, "feature"], "ptype" => [:at_xtype, "plugin"], "type" => [:at_type], "inheritdoc" => [:at_inheritdoc], "inheritDoc" => [:at_inheritdoc], "alias" => [:at_alias_or_inheritdoc], Loading Loading @@ -196,19 +195,6 @@ module JsDuck # Routines for parsing of concrete tags... # # matches @type {type} or @type type # # 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 at_type add_tag(:type) maybe_type if !@current_tag[:type] && look(/\S/) @current_tag[:type] = match(/\S+/) end end # matches @xtype/ptype/ftype/... name def at_xtype(namespace) add_tag(:alias) Loading