def env.bad.go

shake@0.7.0.0 · src/cli.bend:1716

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

1716# the first argument bound to an env value outside its choices, the command
1717# first, then down the selected path
1718def env.bad.go(
1719  mm: Matched,
1720  +args: List<&2, Arg>,
1721  +subs: List<&2, Sub>,
1722  +vars: List<&2, Var>
1723) -> Maybe<&2, Var>:
1724  match mm:
1725    case Leaf{+bs}:
1726      env.bad.args(args, vars, bs)
1727    case Node{+bs, +name, next}:
1728      env.first(env.bad.args(args, vars, bs),
1729        env.bad.go(next, env.sub.args(find_sub(subs, name)), env.sub.kids(find_sub(subs, name)), vars))

Uses (11)

Used by (1)