def next_line

bolt@1.27.0.0 · src/rules/digest.bend:191

import bolt@1.27.0.0/src/rules/digest.bend as Digest
import Base
import bolt@1.27.0.0/src/syntax/outline.bend as Outline

191# the line of the next item that ends an item's lines: any but a constructor,
192# which the outline lists inside its type
193def next_line(items: List<&2, Outline.Item>) -> Maybe<&2, U32>:
194  match items:
195    case Nil{}:
196      None{}
197    case Con{Outline.Item{Outline.ICtor{}, name, line, sig, doc, path}, rest}:
198      next_line(rest)
199    case Con{Outline.Item{kind, name, line, sig, doc, path}, rest}:
200      Some{line}

Uses (5)

Used by (1)