def q.in.text

yaml-for-bend@0.1.1.0 · scan.bend:894

import yaml-for-bend@0.1.1.0/scan.bend as Scan
import Base
import yaml-for-bend@0.1.1.0/token.bend as T

894def q.in.text(+double: Bool, +cur: Cur, +acc: String, +start: T.Mark) -> Qs:
895  +s = cur.s(cur)
896  +c = peek(s, 0n)
897  Bool.pick(Qs, Bool.and(Nat.is_eq(cur.col(cur), 0n), is_marker(s)),
898    QsBad{T.Error{"found unexpected document indicator while scanning a quoted scalar", start, T.Syntax{}}},
899    Bool.pick(Qs, is_end(c), QsBad{T.Error{"found unexpected end of stream while scanning a quoted scalar", start, T.Syntax{}}},
900      Bool.pick(Qs, Bool.or(is_blank(c), is_break(c)), Qs{cur, acc, "", False{}, 0n, False{}, False{}, False{}},
901        q.char(double, c, peek(s, 1n), cur, acc, start))))

Uses (19)

Used by (1)