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

Function fxJSONArray

xs/sources/xsSyntaxical.c:4333–4352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4331}
4332
4333void fxJSONArray(txParser* parser)
4334{
4335 txIndex aLength = 0;
4336 txInteger aLine = parser->states[0].line;
4337 fxGetNextTokenJSON(parser);
4338 for (;;) {
4339 if (parser->states[0].token == XS_TOKEN_RIGHT_BRACKET)
4340 break;
4341 fxJSONValue(parser);
4342 aLength++;
4343 if (parser->states[0].token != XS_TOKEN_COMMA)
4344 break;
4345 fxGetNextTokenJSON(parser);
4346 }
4347 if (parser->states[0].token != XS_TOKEN_RIGHT_BRACKET)
4348 fxReportParserError(parser, parser->states[0].line, "missing ]");
4349 fxGetNextTokenJSON(parser);
4350 fxPushNodeList(parser, aLength);
4351 fxPushNodeStruct(parser, 1, XS_TOKEN_ARRAY, aLine);
4352}
4353
4354void fxJSONModule(txParser* parser)
4355{

Callers 1

fxJSONValueFunction · 0.85

Calls 5

fxGetNextTokenJSONFunction · 0.85
fxJSONValueFunction · 0.85
fxReportParserErrorFunction · 0.85
fxPushNodeListFunction · 0.85
fxPushNodeStructFunction · 0.85

Tested by

no test coverage detected