( tokens: ReadonlyArray<Token>, command: Command.Any )
| 92 | * @internal |
| 93 | */ |
| 94 | export const getSelectedCommandTokens = ( |
| 95 | tokens: ReadonlyArray<Token>, |
| 96 | command: Command.Any |
| 97 | ): ReadonlyArray<Token> => { |
| 98 | const result = scanCommandLevel(tokens, makeCommandContext(command, [])) |
| 99 | return result._tag === "Leaf" ? tokens : getSelectedCommandTokens(result.childTokens, result.sub) |
| 100 | } |
| 101 | |
| 102 | /* ========================================================================== */ |
| 103 | /* Types */ |
nothing calls this directly
no test coverage detected