def sent
bolt@1.27.0.0 · src/lsp/semantic.bend:388
import bolt@1.27.0.0/src/lsp/semantic.bend as Semantic
import Base
import bolt@1.27.0.0/src/lsp/enc.bend as Enc
388
389
390
391def sent(sems: List<&2, Sem>, +ee: Enc.Enc, lines: List<&2, String>, cur: U32) -> List<&2, Sem>:
392 match sems:
393 case Nil{}:
394 Nil{}
395 case Con{Sem{+line, col, len, typ}, rest}:
396 +here = sent.seek(lines, cur, line)
397 +cs = String.to_list(Maybe.default(&2, String, List.head(&2, String, here), ""))
398 sent.one(ee, cs, Sem{line, col, len, typ}) <> sent(rest, ee, here, line)