mondo mode for StrudelMirror / repl / mini repl
This commit is contained in:
parent
6d21456423
commit
5eabcf0618
4 changed files with 11 additions and 2 deletions
|
|
@ -21,6 +21,7 @@ export function repl({
|
|||
setInterval,
|
||||
clearInterval,
|
||||
id,
|
||||
mondo = false,
|
||||
}) {
|
||||
const state = {
|
||||
schedulerError: undefined,
|
||||
|
|
@ -180,6 +181,10 @@ export function repl({
|
|||
setTime(() => scheduler.now()); // TODO: refactor?
|
||||
await beforeEval?.({ code });
|
||||
shouldHush && hush();
|
||||
|
||||
if (mondo) {
|
||||
code = `mondolang\`${code}\``;
|
||||
}
|
||||
let { pattern, meta } = await _evaluate(code, transpiler, transpilerOptions);
|
||||
if (Object.keys(pPatterns).length) {
|
||||
let patterns = Object.values(pPatterns);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue