Method: JsDuck::Tag::Cfg#parse_doc

Defined in:
lib/jsduck/tag/cfg.rb

#parse_doc(p, pos) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/jsduck/tag/cfg.rb', line 23

def parse_doc(p, pos)
  tag = p.standard_tag({
      :tagname => :cfg,
      :type => true,
      :name => true,
      :default => true,
      :optional => true
    })

  # don't parse (required) after subproperties
  unless tag[:name] =~ /\./
    tag[:optional] = false if parse_required(p)
  end

  tag[:doc] = :multiline
  tag
end