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

Function fxAssertionCode

xs/sources/xsre.c:2042–2069  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2040}
2041
2042void fxAssertionCode(txPatternParser* parser, void* it, txInteger direction, txInteger sequel)
2043{
2044 txAssertion* self = it;
2045 txInteger* buffer = (txInteger*)(((txByte*)*(parser->code)) + self->step);
2046 if (self->not) {
2047 *buffer++ = cxAssertionNotStep;
2048 *buffer++ = self->term->step;
2049 *buffer++ = self->assertionIndex;
2050 *buffer++ = sequel;
2051 }
2052 else {
2053 *buffer++ = cxAssertionStep;
2054 *buffer++ = self->term->step;
2055 *buffer++ = self->assertionIndex;
2056 }
2057 fxPatternParserCheckStack(parser);
2058 (*self->term->dispatch.code)(parser, self->term, self->direction, self->completion);
2059 buffer = (txInteger*)(((txByte*)*(parser->code)) + self->completion);
2060 if (self->not) {
2061 *buffer++ = cxAssertionNotCompletion;
2062 *buffer++ = self->assertionIndex;
2063 }
2064 else {
2065 *buffer++ = cxAssertionCompletion;
2066 *buffer++ = sequel;
2067 *buffer++ = self->assertionIndex;
2068 }
2069}
2070
2071void fxCaptureCode(txPatternParser* parser, void* it, txInteger direction, txInteger sequel)
2072{

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected