If you mean using Espruino directly from C code, you want something like:
JsVar *v = jsvNewFromString("......"); jsvUnLock(jspEvaluateVar(jsiGetParser(), lineToExecute, 0)); jsvUnLock(v);
Note that EvaluateVar returns a result as well.
Espruino can't execute directly from char* strings (only from JsVar-based strings).
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
If you mean using Espruino directly from C code, you want something like:
Note that EvaluateVar returns a result as well.
Espruino can't execute directly from char* strings (only from JsVar-based strings).