tricu

An interpreted language for exploring Tree Calculus
Log | Files | Refs | README | LICENSE

data-line.scp (396B)


      1 !export dataLine
      2 -- A predicate for retaining complete data lines with filter.scp.
      3 -- Input: one LF-split line; state ignored. Exactly leaf (false) or stem leaf
      4 -- (true), not an optional line or a truthy arbitrary tree.
      5 -- CR and leading whitespace are ordinary content, not stripped.
      6 consumer dataLine
      7   []             @ _ => leaf
      8   [35 | rest]    @ _ => leaf
      9   [first | rest] @ _ => stem leaf