( value: string, cursor: TokenCursor, context: CommandContext, state: ParseState )
| 924 | * - Simply add value to arguments list |
| 925 | */ |
| 926 | const processValue = ( |
| 927 | value: string, |
| 928 | cursor: TokenCursor, |
| 929 | context: CommandContext, |
| 930 | state: ParseState |
| 931 | ): SubcommandResult | undefined => { |
| 932 | if (state.mode._tag === "AwaitingFirstValue") { |
| 933 | const result = resolveFirstValue(value, cursor, context, state) |
| 934 | |
| 935 | if (result._tag === "Subcommand") { |
| 936 | return result.result |
| 937 | } |
| 938 | |
| 939 | state.mode = { _tag: "CollectingArguments" } |
| 940 | } |
| 941 | |
| 942 | state.arguments.push(value) |
| 943 | return undefined |
| 944 | } |
| 945 | |
| 946 | /* ========================================================================== */ |
| 947 | /* Command Level Scanning */ |
no test coverage detected