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

Function fxIsRegExp

xs/sources/xsRegExp.c:173–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173txBoolean fxIsRegExp(txMachine* the, txSlot* slot)
174{
175#if mxRegExp
176 if (mxIsReference(slot)) {
177 txSlot* instance = slot->value.reference;
178 mxPushSlot(slot);
179 mxGetID(mxID(_Symbol_match));
180 if (the->stack->kind != XS_UNDEFINED_KIND)
181 return fxToBoolean(the, the->stack++);
182 mxPop();
183 if ((instance->next) && (instance->next->flag & XS_INTERNAL_FLAG) && (instance->next->kind == XS_REGEXP_KIND))
184 return 1;
185 }
186#endif
187 return 0;
188}
189
190txSlot* fxNewRegExpInstance(txMachine* the)
191{

Callers 5

fx_RegExpFunction · 0.85

Calls 1

fxToBooleanFunction · 0.85

Tested by

no test coverage detected