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

Function fxQuantifierCode

xs/sources/xsre.c:2186–2214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2184}
2185
2186void fxQuantifierCode(txPatternParser* parser, void* it, txInteger direction, txInteger sequel)
2187{
2188 txQuantifier* self = it;
2189 txInteger* buffer = (txInteger*)(((txByte*)*(parser->code)) + self->step);
2190 *buffer++ = cxQuantifierStep;
2191 *buffer++ = self->loop;
2192 *buffer++ = self->quantifierIndex;
2193 *buffer++ = self->min;
2194 *buffer++ = self->max;
2195 buffer = (txInteger*)(((txByte*)*(parser->code)) + self->loop);
2196 if (self->greedy)
2197 *buffer++ = cxQuantifierGreedyLoop;
2198 else
2199 *buffer++ = cxQuantifierLazyLoop;
2200 *buffer++ = self->term->step;
2201 *buffer++ = self->quantifierIndex;
2202 *buffer++ = sequel;
2203 *buffer++ = self->captureIndex + 1;
2204 *buffer++ = self->captureIndex + self->captureCount;
2205 fxPatternParserCheckStack(parser);
2206 (*self->term->dispatch.code)(parser, self->term, direction, self->completion);
2207 buffer = (txInteger*)(((txByte*)*(parser->code)) + self->completion);
2208 *buffer++ = cxQuantifierCompletion;
2209 *buffer++ = self->loop;
2210 *buffer++ = self->quantifierIndex;
2211 *buffer++ = sequel;
2212 *buffer++ = self->captureIndex + 1;
2213 *buffer++ = self->captureIndex + self->captureCount;
2214}
2215
2216void fxSequenceCode(txPatternParser* parser, void* it, txInteger direction, txInteger sequel)
2217{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected