def parse.step.help_path

shake@0.7.0.0 · src/cli.bend:1295

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

1295# a word after `help`: the subcommand it names, whose own subcommands the
1296# next word is looked up in, or an unexpected word
1297def parse.step.help_path(
1298  found: Maybe<&2, Sub>,
1299  +tok: String,
1300  +args: List<&2, Arg>,
1301  +up: List<&2, Level>,
1302  +subs: List<&2, Sub>,
1303  +path: List<&2, String>,
1304  +binds: List<&2, Bind>,
1305  +pos: List<&2, Arg>,
1306  +raw: Bool,
1307  +seen: Bool
1308) -> St:
1309  match found:
1310    case None{}:
1311      parse.dead(Unexpected{path, tok}, args, up, subs, path, binds, pos, raw, seen)
1312    case Some{ss}:
1313      Sub{_n, _a, _g, next_subs} = ss
1314      St{Help{}, args, up, next_subs, List.append(&2, String, path, [tok]), binds,
1315        pos, raw, seen}

Uses (13)

Used by (1)