Semantic.sent: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/lsp/semantic.bend as Semantic Lines 388-398 of bolt@1.27.0.0/src/lsp/semantic.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&start_line=388&end_line=398 import Base import bolt@1.27.0.0/src/lsp/enc.bend as Enc # the tokens, in order, with columns and lengths in the negotiated encoding # (enc.bend's out.col); lines starts at line cur, and the tokens never go # back a line def sent(sems: List<&2, Sem>, +ee: Enc.Enc, lines: List<&2, String>, cur: U32) -> List<&2, Sem>: match sems: case Nil{}: Nil{} case Con{Sem{+line, col, len, typ}, rest}: +here = sent.seek(lines, cur, line) +cs = String.to_list(Maybe.default(&2, String, List.head(&2, String, here), "")) sent.one(ee, cs, Sem{line, col, len, typ}) <> sent(rest, ee, here, line) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.head https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe.default https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.to_list https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/enc.bend&name=Enc https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=Sem https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=sent.one https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=sent.seek