Run (compiler)
Share Code
JsonScript
Share your playground code ...
×
Copy
[ { function
: { functionName: "executeLoop", parameters: { "y":
}, code: [ { while: { condition : { math: { left: y, op: ">", right: 0} }, loop : [ { console: y }, { assign: { to: y, value: { math: { left: y, op: "-", right: 1} } } } ] } } ] } }, { -> : { proc: executeLoop, parameters : [22]} } ]
JsonScript is a very general programming language which I developed because JSON is fun. The language compiles to WebAssambley, which is even faster then Javascript. The style of the language trys to be close to the AST (Abstract Syntax Tree). The JsonScript compiler is written in TypeScript, you can try it out using the above editor. When you click the 'run' button above