()
| 21 | } |
| 22 | |
| 23 | parseValue(): any { |
| 24 | this.skipWhitespace(); |
| 25 | if (this.isAtEnd()) { |
| 26 | throw this.error('Unexpected end of input'); |
| 27 | } |
| 28 | const ch = this.currentChar(); |
| 29 | if (ch === '{') return this.parseObject(); |
| 30 | if (ch === '[') return this.parseArray(); |
| 31 | if (ch === '"' || ch === "'") return this.parseString(); |
| 32 | if (ch === '-' || ch === '+' || (ch >= '0' && ch <= '9') || ch === '.') |
| 33 | return this.parseNumber(); |
| 34 | return this.parseIdentifier(); |
| 35 | } |
| 36 | |
| 37 | private parseObject(): any { |
| 38 | const obj: Record<string, any> = {}; |
no test coverage detected