* Parse a command string and return a ParsedCommand instance. * Returns null if parsing fails completely.
(command: string)
| 310 | * Returns null if parsing fails completely. |
| 311 | */ |
| 312 | parse(command: string): Promise<IParsedCommand | null> { |
| 313 | if (command === lastCmd && lastResult !== undefined) { |
| 314 | return lastResult |
| 315 | } |
| 316 | lastCmd = command |
| 317 | lastResult = doParse(command) |
| 318 | return lastResult |
| 319 | }, |
| 320 | } |
no test coverage detected