Recognizes keyword assignments in the `pkgbase` section in SRCINFO data. Since there're a lot of keywords and many of them are shared between the `pkgbase` and `pkgname` section, the keywords are bundled into somewhat logical groups. - [`SourceProperty`] are keywords that are related to the `source` keyword, such as checksums. - [`SharedMetaProperty`] are keywords that are related to general met
(input: &mut &str)
| 492 | .parse_next(input), |
| 493 | PackageBaseKeyword::SharedMeta(keyword) => SharedMetaProperty::parser(keyword) |
| 494 | .map(PackageBaseProperty::Meta) |
| 495 | .parse_next(input), |
| 496 | PackageBaseKeyword::Relation(keyword) => RelationProperty::parser(keyword) |
| 497 | .map(PackageBaseProperty::Relation) |
| 498 | .parse_next(input), |
| 499 | PackageBaseKeyword::Exclusive(keyword) => { |
| 500 | PackageBaseProperty::exclusive_property_parser(keyword).parse_next(input) |
| 501 | } |
| 502 | } |
| 503 | } |
| 504 | |
| 505 | /// Recognizes keyword assignments exclusive to the `pkgbase` section in SRCINFO data. |
| 506 | /// |
| 507 | /// # Note |
| 508 | /// |
| 509 | /// This function relies on the keyword already having been parsed and expects it as parameter. |
| 510 | /// The cursor should be positioned right after the keyword. |
| 511 | fn exclusive_property_parser<'a>( |
| 512 | keyword: ExclusivePackageBaseKeyword, |
| 513 | ) -> impl Parser<Input<'a>, Self, ErrMode<ParseStack<'a>>> { |
| 514 | let parser = move |input: &mut Input<'a>| -> PResult<'a, Self> { |
| 515 | // Parse a possible architecture suffix for architecture specific fields. |
| 516 | let architecture = match keyword { |
| 517 | ExclusivePackageBaseKeyword::MakeDepends |
| 518 | | ExclusivePackageBaseKeyword::CheckDepends => { |
| 519 | architecture_suffix.parse_next(input)? |
| 520 | } |
nothing calls this directly
no outgoing calls
no test coverage detected