Skip to main content

parse_attribute_lines

Function parse_attribute_lines 

Source
pub fn parse_attribute_lines(bytes: &[u8]) -> Vec<AttributeLine>
Expand description

What: The lines of an attributes file’s bytes that set something: patterns with tokens, and macro definitions. Why: A comment or blank line applies nothing. A line ends at its first NUL, as a C string does, and the lines after it are still read, which can only make more lines count. A quoted line is only flagged, because its true pattern, its token boundary and its macro marker depend on C-style unquoting.

In TS you’d write (pseudocode):

function parseAttributeLines(bytes: Buffer, worktreeFile: boolean): AttributeLine[];