def Yaml.ends
import bend-kube-runtime@0.2.0.0/src/yaml.bend as Yamlimport Base
764# Whether the top container ends before a line at indent i: it is deeper,
765# or it is a sequence at i and the line is no item of it.
766def Yaml.ends(+st: List<&2, YFrame>, +i: U32, dash: Bool) -> Bool:
767 match st:
768 case Con{YMap{+j, ms, p}, t}:
769 U32.is_gt(j, i)
770 case Con{YSeq{+j, xs, p}, t}:
771 Bool.or(U32.is_gt(j, i), Bool.and(U32.is_eq(j, i), Bool.not(dash)))
772 case _:
773 False{}