( value: string, cursor: TokenCursor, context: CommandContext, state: ParseState )
| 889 | * - Simply add value to arguments list |
| 890 | */ |
| 891 | const processValue = ( |
| 892 | value: string, |
| 893 | cursor: TokenCursor, |
| 894 | context: CommandContext, |
| 895 | state: ParseState |
| 896 | ): SubcommandResult | undefined => { |
| 897 | if (state.mode._tag === "AwaitingFirstValue") { |
| 898 | const result = resolveFirstValue(value, cursor, context, state) |
| 899 | |
| 900 | if (result._tag === "Subcommand") { |
| 901 | return result.result |
| 902 | } |
| 903 | |
| 904 | state.mode = { _tag: "CollectingArguments" } |
| 905 | } |
| 906 | |
| 907 | state.arguments.push(value) |
| 908 | return undefined |
| 909 | } |
| 910 | |
| 911 | /* ========================================================================== */ |
| 912 | /* Command Level Scanning */ |
no test coverage detected