Cli.scan_go: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 3585-3598 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=3585&end_line=3598 import Base # An external subcommand takes the rest of argv verbatim. def scan_go(tokens: List<&2, String>, mode: Mode) -> Mode: match tokens mode: case argv Capture{state, name}: Closed{Stopped{scan_external(state, name, argv)}} case Nil{} _: mode case +token <> rest Open{state}: scan_go(rest, scan_open(String.eq(token, "--"), state, token)) case token <> rest Fetch{state, info}: scan_go(rest, scan_fetch(state, info, token)) case token <> rest Operands{state, ended}: scan_go(rest, Operands{scan_operand(state, token), ended}) case token <> rest Closed{tail}: scan_go(rest, Closed{scan_tail(tail, token)}) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Mode https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Tail https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=scan_external https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=scan_fetch https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=scan_open https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=scan_operand https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=scan_tail