def span_str
import cswap-bend-cli@0.1.0.0/json/lex.bend as Leximport Base
65# Chars through the closing quote (or to the end when it is missing).
66def span_str(s: String, live: Bool, +esc: Bool) -> Nat:
67 match s live:
68 case SCon{+c, t} True{}:
69 1n+span_str(t, not(not(esc) && eqc(c, '"')), not(esc) && eqc(c, '\\'))
70 case _ _:
71 0n