Method: JsDuck::DocParser#at_type
- Defined in:
- lib/jsduck/doc_parser.rb
#at_type ⇒ Object
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.
365 366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/jsduck/doc_parser.rb', line 365 def at_type match(/@type/) add_tag(:type) skip_horiz_white if look(/\{/) tdf = typedef @current_tag[:type] = tdf[:type] @current_tag[:optional] = true if tdf[:optional] elsif look(/\S/) @current_tag[:type] = match(/\S+/) end skip_white end |