rzimmerman / kal

A powerful, easy-to-use, and easy-to-read programming language for the future.
http://rzimmerman.github.io/kal
MIT License
394 stars 18 forks source link

compile Error: asynchronous for ... to ... loops are not supported #134

Open cakeisgod opened 5 years ago

cakeisgod commented 5 years ago

My code is as simple as follow:

for index2 from 0 to 99
    console.log("index 11")
    if 1 != null
        console.log("index 22")

Compile Error message:

(function (exports, require, module, filename, dirname) { (function(){function compile(code,options){var token_rv,raw_tokens,comments,tokens,root_node;code=(""+code).trim(),null==options&&(options={bare:!1});try{return options.literate&&(code=literate.translate(code)),token_rv=lexer.tokenize(code),raw_tokens=token_rv[0],comments=token_rv[1],tokens=sugar.translate_sugar(raw_tokens,options,lexer.tokenize),root_node=parser.parse(tokens,comments,options),root_node.js(options)}catch(compile_error){throw compile_error.message||compile_error}}function kal_eval(code,options){var js,vm,sandbox;return null==options&&(options={}),js=compile(code,options),options.show_js?console.log(js):void 0,vm=require("vm"),sandbox=options.sandbox?options.sandbox===!0?exports.makeSandbox(options):options.sandbox:global,sandbox===global?(null==sandbox.module&&null==sandbox.require&&(sandbox=exports.makeSandbox(sandbox,options)),vm.runInThisContext(js)):vm. asynchronous for ... to ... loops are not supported