(value: string)
| 220 | } |
| 221 | |
| 222 | private parseDelimiter(value: string): ParseResult { |
| 223 | switch (value) { |
| 224 | case "[": |
| 225 | return this.parseArray(); |
| 226 | |
| 227 | case "<<": |
| 228 | return this.parseDict(); |
| 229 | |
| 230 | case "]": |
| 231 | case ">>": |
| 232 | throw new ObjectParseError(`Unexpected delimiter: ${value}`); |
| 233 | |
| 234 | default: |
| 235 | throw new ObjectParseError(`Unknown delimiter: ${value}`); |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | private parseArray(): ParseResult { |
| 240 | this.shift(); // consume '[' |
no test coverage detected