Method: JsDuck::DocParser#maybe_type

Defined in:
lib/jsduck/doc_parser.rb

#maybe_typeObject

matches type if possible and sets it on @current_tag Also checks for optionality= in type definition.



441
442
443
444
445
446
447
448
# File 'lib/jsduck/doc_parser.rb', line 441

def maybe_type
  skip_horiz_white
  if look(/\{/)
    tdf = typedef
    @current_tag[:type] = tdf[:type]
    @current_tag[:optional] = true if tdf[:optional]
  end
end