def directive.name

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

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

1338def directive.name(w: Taken, +st: Sc, +at: T.Mark) -> Step:
1339  match w:
1340    case Taken{+name, +k}:
1341      when(Step, Nat.is_eq(k, 0n), u => fail(st, "could not find expected directive name while scanning a directive", at),
1342        u => directive.named(name, skip(st, 1n+k), at))

Uses (10)

Used by (1)