def parse.take_arg.kind

shake@0.7.0.0 · src/cli.bend:701

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

701# dispatch on the found Arg's kind
702def parse.take_arg.kind(
703  kk: ArgKind,
704  +name: String,
705  val: Maybe<&2, String>,
706  +orig: String,
707  +args: List<&2, Arg>,
708  +up: List<&2, Level>,
709  +subs: List<&2, Sub>,
710  +path: List<&2, String>,
711  +binds: List<&2, Bind>,
712  +pos: List<&2, Arg>,
713  +raw: Bool,
714  +seen: Bool
715) -> St:
716  match kk:
717    case Flag{}:
718      parse.once(bound(binds, name), parse.take_flag(val, name, orig, args, up, subs, path,
719        binds, pos, raw, seen), name, path)
720    case Opt{}:
721      parse.once(bound(binds, name), parse.take_opt(val, name, args, up, subs, path, binds, pos,
722        raw, seen), name, path)
723    case Many{}:
724      parse.take_opt(val, name, args, up, subs, path, binds, pos, raw, seen)
725    case Pos{}:
726      parse.dead(UnknownFlag{path, orig}, args, up, subs, path, binds, pos, raw, seen)
727    case Rest{}:
728      parse.dead(UnknownFlag{path, orig}, args, up, subs, path, binds, pos, raw, seen)

Uses (16)

Used by (1)