def parse.take_flag

shake@0.7.0.0 · src/cli.bend:652

import shake@0.7.0.0/src/cli.bend as Cli
import Base

652# a flag with no glued value is set; a glued value is unexpected
653def parse.take_flag(
654  val: Maybe<&2, String>,
655  +name: String,
656  +orig: String,
657  +args: List<&2, Arg>,
658  +up: List<&2, Level>,
659  +subs: List<&2, Sub>,
660  +path: List<&2, String>,
661  +binds: List<&2, Bind>,
662  pos: List<&2, Arg>,
663  +raw: Bool,
664  +seen: Bool
665) -> St:
666  match val:
667    case None{}:
668      parse.put(name, "true", args, up, subs, path, binds, pos, raw, seen)
669    case Some{_v}:
670      parse.dead(Unexpected{path, orig}, args, up, subs, path, binds, pos, raw, seen)

Uses (12)

Used by (1)