def parse.take_arg

shake@0.7.0.0 · src/cli.bend:730

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

730# a found Arg, or an unknown flag
731def parse.take_arg(
732  found: Maybe<&2, Arg>,
733  val: Maybe<&2, String>,
734  +orig: String,
735  +args: List<&2, Arg>,
736  +up: List<&2, Level>,
737  +subs: List<&2, Sub>,
738  +path: List<&2, String>,
739  +binds: List<&2, Bind>,
740  pos: List<&2, Arg>,
741  +raw: Bool,
742  +seen: Bool
743) -> St:
744  match found:
745    case None{}:
746      parse.dead(UnknownFlag{path, orig}, args, up, subs, path, binds, pos, raw, seen)
747    case Some{a}:
748      Arg{+name, _s, _l, kind, _h, _r, _d, _c} = a
749      parse.take_arg.kind(kind, name, val, orig, args, up, subs, path, binds, pos,
750        raw, seen)

Uses (12)

Used by (2)