started refac repl to new scheduler + transpiler
This commit is contained in:
parent
c99d957bc8
commit
14c2da4fa2
17 changed files with 5650 additions and 697 deletions
|
|
@ -1,8 +1,17 @@
|
|||
import { Cyclist } from './cyclist.mjs';
|
||||
import { evaluate as _evaluate } from './evaluate.mjs';
|
||||
|
||||
export function repl({ interval, defaultOutput, onSchedulerError, onEvalError, onEval, getTime, transpiler }) {
|
||||
const scheduler = new Cyclist({ interval, onTrigger: defaultOutput, onError: onSchedulerError, getTime });
|
||||
export function repl({
|
||||
interval,
|
||||
defaultOutput,
|
||||
onSchedulerError,
|
||||
onEvalError,
|
||||
onEval,
|
||||
getTime,
|
||||
transpiler,
|
||||
onToggle,
|
||||
}) {
|
||||
const scheduler = new Cyclist({ interval, onTrigger: defaultOutput, onError: onSchedulerError, getTime, onToggle });
|
||||
const evaluate = async (code) => {
|
||||
if (!code) {
|
||||
throw new Error('no code to evaluate');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue