def finish_optional_value
import cli@0.2.0.0/cli.bend as Cliimport 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}