28 lines
533 B
JavaScript
28 lines
533 B
JavaScript
|
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() {
|
||
|
|
||
|
}
|