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

Function xs_repl_eval

examples/js/repl/io/repl.c:36–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36void xs_repl_eval(txMachine* the)
37{
38 txStringStream aStream;
39 txSlot* realm = mxProgram.value.reference->next->value.module.realm;
40 aStream.slot = mxArgv(0);
41 aStream.offset = 0;
42 aStream.size = c_strlen(fxToString(the, mxArgv(0)));
43 fxRunScript(the, fxParseScript(the, &aStream, fxStringGetter, mxProgramFlag), mxRealmGlobal(realm), C_NULL, mxRealmClosures(realm)->value.reference, C_NULL, mxProgram.value.reference);
44 mxPullSlot(mxResult);
45}
46
47void xs_repl_isDebug(xsMachine *the)
48{

Callers

nothing calls this directly

Calls 3

fxToStringFunction · 0.85
fxRunScriptFunction · 0.85
fxParseScriptFunction · 0.50

Tested by

no test coverage detected