MCPcopy Create free account
hub / github.com/archlinux/alpm / preceding_lines_parser

Method preceding_lines_parser

alpm-srcinfo/src/source_info/parser.rs:190–200  ·  view source on GitHub ↗

Parses the start of the file in case it contains one or more empty lines or comment lines. This consumes the first few lines until the `pkgbase` section is hit. Further comments and newlines are handled in the scope of the respective `pkgbase`/`pkgname` sections.

(input: &mut &str)

Source from the content-addressed store, hash-verified

188 /// pkgrel = 1
189 /// pkgdesc = A project that does something
190 /// url = https://example.org/
191 /// arch = x86_64
192 /// depends = glibc
193 /// optdepends = python: for special-python-script.py
194 /// makedepends = cmake
195 /// checkdepends = extra-test-tool
196 ///
197 /// pkgname = example
198 /// depends = glibc
199 /// depends = gcc-libs
200 /// "#;
201 ///
202 /// // Parse the given srcinfo content.
203 /// let parsed = SourceInfoContent::parser.parse(Input::new(source_info_data))?;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected