Loading lib/jsduck/doc_scanner.rb +0 −18 Original line number Diff line number Diff line Loading @@ -63,24 +63,6 @@ module JsDuck end end # matches: "(optional)" def maybe_optional skip_horiz_white if look(/\(optional\)/i) match(/\(optional\)/i) @current_tag[:optional] = true end end # matches: "(required)" def maybe_required skip_horiz_white if look(/\(required\)/i) match(/\(required\)/i) @current_tag[:optional] = false end end # matches ident.chain if possible and sets it on @current_tag def maybe_ident_chain(propname) skip_horiz_white Loading lib/jsduck/tag/cfg.rb +5 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,11 @@ module JsDuck::Tag p.add_tag(:cfg) p.maybe_type p.maybe_name_with_default p.maybe_required p.current_tag[:optional] = false if parse_required(p) end def parse_required(p) p.hw.match(/\(required\)/i) end end end lib/jsduck/tag/param.rb +5 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,11 @@ module JsDuck::Tag p.add_tag(:param) p.maybe_type p.maybe_name_with_default p.maybe_optional p.current_tag[:optional] = true if parse_optional(p) end def parse_optional(p) p.hw.match(/\(optional\)/i) end end end Loading
lib/jsduck/doc_scanner.rb +0 −18 Original line number Diff line number Diff line Loading @@ -63,24 +63,6 @@ module JsDuck end end # matches: "(optional)" def maybe_optional skip_horiz_white if look(/\(optional\)/i) match(/\(optional\)/i) @current_tag[:optional] = true end end # matches: "(required)" def maybe_required skip_horiz_white if look(/\(required\)/i) match(/\(required\)/i) @current_tag[:optional] = false end end # matches ident.chain if possible and sets it on @current_tag def maybe_ident_chain(propname) skip_horiz_white Loading
lib/jsduck/tag/cfg.rb +5 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,11 @@ module JsDuck::Tag p.add_tag(:cfg) p.maybe_type p.maybe_name_with_default p.maybe_required p.current_tag[:optional] = false if parse_required(p) end def parse_required(p) p.hw.match(/\(required\)/i) end end end
lib/jsduck/tag/param.rb +5 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,11 @@ module JsDuck::Tag p.add_tag(:param) p.maybe_type p.maybe_name_with_default p.maybe_optional p.current_tag[:optional] = true if parse_optional(p) end def parse_optional(p) p.hw.match(/\(optional\)/i) end end end