Function parse_clearable_value_array

Source
fn parse_clearable_value_array<'a, O, P: Parser<&'a str, O, ErrMode<ContextError>>>(
    keyword: &Keyword,
    value: &'a ClearableValue,
    parser: P,
) -> Result<Override<Vec<O>>, BridgeError>
Expand description

Parses all elements of a ClearableValue as a Vec of specific types.

§Legacy support

This does not differentiate between ClearableValue::Single and ClearableValue::Array variants, as PKGBUILD files allow both notations for array values.

Modern versions of makepkg enforce that certain values must be arrays. However, to be able to parse both historic and modern PKGBUILD files this function is less strict.

§Errors

Returns an error if the elements of value cannot be parsed as a Vec of a specific type.