def closes_with
import bolt@1.27.0.0/src/syntax/tree.bend as Treeimport Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex
151# a token that closes a group: `)`, `]`, `}` or a run of `>`
152def closes_with(kk: Lex.TokKind, +tt: String) -> Bool:
153 match kk:
154 case Lex.TClose{}:
155 True{}
156 case Lex.TOp{}:
157 Bool.and(Bool.not(String.is_empty(tt)), all_gt(String.to_list(tt)))
158 case other:
159 False{}