MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / parse

Method parse

src/common/json5.ts:2–12  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

1export class JSON5 {
2 static parse(input: string): any {
3 const parser = new JSON5Parser(input);
4 const value = parser.parseValue();
5 parser.skipWhitespace();
6 if (!parser.isAtEnd()) {
7 throw parser.error(
8 `Unexpected token '${parser.currentChar()}' after parsing complete value`
9 );
10 }
11 return value;
12 }
13}
14
15class JSON5Parser {

Callers

nothing calls this directly

Calls 5

parseValueMethod · 0.95
skipWhitespaceMethod · 0.95
isAtEndMethod · 0.95
errorMethod · 0.95
currentCharMethod · 0.95

Tested by

no test coverage detected