def scan_value_result
import cli@0.2.0.0/cli.bend as Cliimport Base
3075# E04 quotes the first element that fails.
3076def scan_value_result(found: Maybe<&2, Bad>, state: ScanState,
3077 info: ArgInfo, value: String) -> ScanState:
3078 match found:
3079 case None{}:
3080 match info:
3081 case ArgInfo{id, usage, short, long, kind, attrs}:
3082 scan_event(state, ValueHit{id, value})
3083 case Some{Bad{bad, why}}:
3084 scan_error(state, E04{arg_display(info), bad, why})