()
| 185 | } |
| 186 | |
| 187 | public exec(): string[] { |
| 188 | while (this.rest) { |
| 189 | if (this.inDoubleQuotes) { |
| 190 | this.handleDoubleQuotes(); |
| 191 | continue; |
| 192 | } |
| 193 | |
| 194 | this.handleWhitespace(); |
| 195 | |
| 196 | const nextMatch = /[\s'"\\]/.exec(this.rest); |
| 197 | if (!nextMatch) { |
| 198 | this.addResult(this.rest); |
| 199 | this.rest = ''; |
| 200 | continue; |
| 201 | } |
| 202 | |
| 203 | this.handleNonDoubleQuote(nextMatch); |
| 204 | } |
| 205 | return this.results; |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | export function splitArguments(str = ''): string[] { |
no test coverage detected