Skip to main content

lookup_param_doc

Function lookup_param_doc 

Source
pub fn lookup_param_doc(
    doc_index: &DocIndex,
    decl_node: &Value,
    sources: &Value,
) -> Option<String>
Expand description

Look up documentation for a parameter from its parent function/error/event.

When hovering a VariableDeclaration that is a parameter or return value, this walks up to the parent declaration (via scope) and extracts the relevant @param or @return entry for this specific name.

Tries the DocIndex first (structured devdoc), then falls back to parsing the raw AST documentation field.