def upcoming
import bend-lint-rules@0.2.0.0/layout/format.bend as Formatimport Base
1147# The first tree after a run of newlines.
1148def upcoming(xs: List<&2, Tree>) -> Maybe<&2, Tree>:
1149 match xs:
1150 case Nil{}:
1151 None{}
1152 case Con{Leaf{Token{text, beg, end, col, Newline{}, sym, name, tail, from}}, rest}:
1153 upcoming(rest)
1154 case Con{x, rest}:
1155 Some{x}