Skip to main content

extract_param_names

Function extract_param_names 

Source
pub(crate) fn extract_param_names(tags: &[String]) -> HashSet<String>
Expand description

Extract the set of parameter names declared via @param in a list of roxygen tags.

For each @param <names> <desc> tag in tags, extracts <names> and inserts each comma-separated name into the returned HashSet. roxygen2 supports documenting several params in one tag (@param a,b,c desc documents a, b, and c) — the name token is split on , (and each piece trimmed defensively, though roxygen2’s own syntax has no spaces around the commas) so multi-name tags don’t collapse to a single name. Used by R6 class generators to build the set of class-level params so method param loops can suppress (no documentation available) for names already covered at class level (roxygen2 8.0.0 inherits class-level @param tags into all methods automatically).