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

Function fxPatternParserError

xs/sources/xsre.c:2293–2314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2291}
2292
2293void fxPatternParserError(txPatternParser* parser, txString format, ...)
2294{
2295 c_va_list arguments;
2296 txString pattern = parser->pattern;
2297 txString error = parser->error;
2298 txInteger offset = parser->offset;
2299 while (offset > 80) {
2300 txInteger character;
2301 txString p = mxStringByteDecode(pattern, &character);
2302 offset -= (txInteger)(p - pattern);
2303 pattern = p;
2304 }
2305 while (offset) {
2306 *error++ = c_read8(pattern++);
2307 offset--;
2308 }
2309 *error++ = ' ';
2310 c_va_start(arguments, format);
2311 vsnprintf(error, sizeof(parser->error) - (error - parser->error), format, arguments);
2312 c_va_end(arguments);
2313 c_longjmp(parser->jmp_buf, 1);
2314}
2315
2316void fxPatternParserEscape(txPatternParser* parser, txBoolean punctuator)
2317{

Callers 15

fxCharSetExpressionFunction · 0.85
fxCharSetNotFunction · 0.85
fxCharSetOperandFunction · 0.85
fxCharSetParseEscapeFunction · 0.85
fxCharSetRangeFunction · 0.85
fxCharSetStringsFunction · 0.85
fxCaptureNameEscapeFunction · 0.85
fxCaptureNameParseFunction · 0.85
fxCaptureNameParticipateFunction · 0.85
fxDisjunctionParseFunction · 0.85
fxModifiersParseFunction · 0.85
fxQuantifierParseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected