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

Function fxReportParserError

xs/sources/xsScript.c:280–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280void fxReportParserError(txParser* parser, txInteger line, txString theFormat, ...)
281{
282 c_va_list arguments;
283 parser->error = C_EINVAL;
284 parser->errorCount++;
285 c_va_start(arguments, theFormat);
286 (*parser->reportError)(parser->console, parser->path ? parser->path->string : C_NULL, line, theFormat, arguments);
287 c_va_end(arguments);
288 if (parser->console) {
289 parser->errorSymbol = parser->SyntaxErrorSymbol;
290 if (parser->buffer != theFormat) {
291 c_va_start(arguments, theFormat);
292 c_vsnprintf(parser->buffer, parser->bufferSize, theFormat, arguments);
293 c_va_end(arguments);
294 }
295 parser->errorMessage = fxNewParserString(parser, parser->buffer, mxStringLength(parser->buffer));
296 c_longjmp(parser->firstJump->jmp_buf, 1);
297 }
298}
299
300void fxTerminateParser(txParser* parser)
301{

Callers 15

mainFunction · 0.85
fxCheckStrictKeywordFunction · 0.85
fxGetNextCodeFunction · 0.85
fxGetNextDigitsFunction · 0.85
fxGetNextNumberBFunction · 0.85
fxGetNextNumberEFunction · 0.85
fxGetNextNumberOFunction · 0.85
fxGetNextNumberXFunction · 0.85
fxGetNextRegExpFunction · 0.85
fxGetNextStringFunction · 0.85
fxGetNextTokenAuxFunction · 0.85
fxGetNextTokenJSONFunction · 0.85

Calls 1

fxNewParserStringFunction · 0.85

Tested by

no test coverage detected