MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxParseJSONObject

Function fxParseJSONObject

modules/piu/PC/Code/piuCodeJSON.c:85–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void fxParseJSONObject(PiuCodeParser parser)
86{
87 fxParseJSONToken(parser);
88 for (;;) {
89 if (parser->token == XS_JSON_TOKEN_RIGHT_BRACE)
90 break;
91 if (parser->token != XS_JSON_TOKEN_STRING)
92 PiuCodeParserError(parser);
93 PiuCodeParserColorAt(parser, 1, parser->offset);
94 PiuCodeParserColorAt(parser, 0, parser->input);
95 fxParseJSONToken(parser);
96 if (parser->token != XS_JSON_TOKEN_COLON)
97 PiuCodeParserError(parser);
98 fxParseJSONToken(parser);
99 fxParseJSONValue(parser);
100 if (parser->token != XS_JSON_TOKEN_COMMA)
101 break;
102 fxParseJSONToken(parser);
103 }
104 if (parser->token != XS_JSON_TOKEN_RIGHT_BRACE)
105 PiuCodeParserError(parser);
106 fxParseJSONToken(parser);
107}
108
109void fxParseJSONToken(PiuCodeParser parser)
110{

Callers 1

fxParseJSONValueFunction · 0.70

Calls 4

PiuCodeParserErrorFunction · 0.85
PiuCodeParserColorAtFunction · 0.85
fxParseJSONTokenFunction · 0.70
fxParseJSONValueFunction · 0.70

Tested by

no test coverage detected