def doc.end.check

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

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

1428def doc.end.check(+st: Sc, t: T.Tok) -> Step:
1429  match t:
1430    case T.DocEnd{}:
1431      when(Step, is_breakz(peek(cur.s(head.tail(sc.s(st), sc.at(st), cur.left(sc.cur(st)), False{}, False{})), 0n)), u => Go{st},
1432        u => fail(st, "did not find expected comment or line break after a document end marker", sc.at(st)))
1433    case _:
1434      Go{st}

Uses (14)

Used by (1)