derw-lang/js/index.mjs

28 lines
533 B
JavaScript
Raw Normal View History

2024-11-29 20:09:54 -05:00
import { unparser } from "./unparser.mjs";
import { parser, runner } from "./parser.mjs";
let data = parser(`
on(
[start]
{
echo(add([2][3]))
echo([Hello World!])
echo(add([2][3]))
echo([Hello World!])
}
)
`);
console.log(unparser(data));
console.log(unparser(parser(unparser(data))));
(async function () {
await runner(data, objs);
let ev = new Event('start');
objs.events.dispatchEvent(ev);
})()
function createBlock() {
}