Merge pull request 'mondo notation' (#1311) from uzu into main

Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1311
This commit is contained in:
froos 2025-06-26 15:29:45 +02:00
commit 63ac80eb79
30 changed files with 2213 additions and 47 deletions

View file

@ -21,6 +21,7 @@ export function repl({
setInterval,
clearInterval,
id,
mondo = false,
}) {
const state = {
schedulerError: undefined,
@ -193,6 +194,10 @@ export function repl({
await beforeEval?.({ code });
allTransforms = []; // reset all transforms
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);