Scan.pl.word: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/scan.bend as Scan Lines 729-738 of yaml-for-bend@0.1.1.0/scan.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/scan.bend&start_line=729&end_line=738 import Base import yaml-for-bend@0.1.1.0/token.bend as T # In a word: a blank ends it; ": " or a flow indicator in flow ends the scalar. def pl.word(cur: Cur, +acc: String, +end: T.Mark, +ws: String, +lead: Bool, +brks: Nat, +flow: Bool) -> Pl: match cur: case Cur{+s, +at, +left}: +c = peek(s, 0n) +c1 = peek(s, 1n) +stop = Bool.or(Bool.and(Char.is_eq(c, ':'), Bool.or(is_blankz(c1), Bool.and(flow, is_flow.ind(c1)))), Bool.and(flow, is_flow.ind(c))) Bool.pick(Pl, is_blankz(c), Pl{Cur{s, at, left}, acc, end, ws, lead, brks, False{}, False{}}, Bool.pick(Pl, stop, PlDone{Cur{s, at, left}, acc, end, lead}, Pl{Cur{String.drop(s, 1n), past(at, c), Nat.sub(left, 1n)}, SCon{c, flush(acc, ws, lead, brks)}, past(at, c), "", False{}, 0n, True{}, False{}})) Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.drop https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=Cur https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=Pl https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=flush https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=is_blankz https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=is_flow.ind https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=past https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/scan.bend&name=peek https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/token.bend&name=Mark