Skip to main content

continued_depth

Function continued_depth 

Source
pub fn continued_depth(
    line: &str,
    enclosing: &[Enclosure],
    item_runs: &[usize],
) -> usize
Expand description

How many of the containers in enclosing (outermost first) line continues: the longest prefix of enclosing that strip_enclosure accepts.

item_runs is item_runs(enclosing). Once the rest of the line is blank, the items up to the next quote continue it and that quote does not, so the cost is bounded by the line’s length rather than by the nesting depth.