* parse a rison string into a javascript structure.
(str: string)
| 378 | * parse a rison string into a javascript structure. |
| 379 | */ |
| 380 | parse(str: string): JSONValue { |
| 381 | this.string = str; |
| 382 | this.index = 0; |
| 383 | const value = this.readValue(); |
| 384 | if (this.next()) this.error("unable to parse string as rison: '" + encode(str) + "'"); |
| 385 | return value; |
| 386 | } |
| 387 | |
| 388 | error(message: string): never { |
| 389 | throw new Error('rison parser error: ' + message); |
no test coverage detected