convert_tag: Convert a 'roxygen2' tag to 'roxytypes' equivalent

View source: R/convert.R

convert_tagR Documentation

Convert a roxygen2 tag to roxytypes equivalent

Description

Convert a roxygen2 tag to roxytypes equivalent

Usage

convert_tag(tag, format, ...)

## Default S3 method:
convert_tag(tag, format, ...)

## S3 method for class 'return'
convert_tag(tag, format, ...)

## S3 method for class 'param'
convert_tag(tag, format, ...)

Arguments

tag

(roxygen2::roxy_tag()) A roxygen2 tag to convert.

format

(character[1]) A regular expression, optionally containing named capture groups for type and description, which will be used for restructuring the tag as a roxytypes-equivalent tag.

...

Additional arguments unused.

Value

(“NULL or [tag_edit()]) If the tag can be converted, a tag_edit() is returned, otherwise 'NULL'.

Methods (by class)

  • convert_tag(default): Default handler for tags that can not be converted.

  • convert_tag(return): Convert ⁠@return⁠ tags, parsing type and description from existing description.

  • convert_tag(param): Convert ⁠@param⁠ tags, parsing type and description from existing description.

See Also

Other convert: build_convert_edits(), convert_match_format(), make_convert_edits(), tag_edit()


roxytypes documentation built on Oct. 16, 2024, 1:06 a.m.