def finish_optional_value

cli@0.2.0.0 · cli.bend:1326

import cli@0.2.0.0/cli.bend as Cli
import Base

1326def finish_optional_value(found: PhScan, id: String, short: String,
1327    long: String) -> Usage:
1328  match found:
1329    case PhBad{col}:
1330      Invalid{col}
1331    case PhOK{rev, SCon{Chr{93}, SNil{}}, next}:
1332      Parsed{id, short, long, BareOptionKind{}}
1333    case PhOK{rev, rest, next}:
1334      Invalid{next}

Uses (9)

Used by (2)