diff --git a/README.md b/README.md index 71460e87..6dabadb6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![logo](https://raw.githubusercontent.com/TrigenSoftware/ColaScript/master/colalogo.png) -ColaScript is a language that compiles in JavaScript. This language is similar to Dart, CoffeeScript, Python and PHP, with some original ideas. Compiler based on [UglifyJS2](https://github.com/mishoo/UglifyJS2). You can play with language [here](http://develop.trigen.pro/cola/). +ColaScript is a language that compiles in JavaScript. This language is similar to Dart, CoffeeScript, Python and PHP, with some original ideas. Compiler based on [UglifyJS2](https://github.com/mishoo/UglifyJS2). You can play with language [here (stable)](http://cola.trigen.pro) or [here (dev)](http://cola.trigen.pro/dev/). Installation @@ -380,7 +380,7 @@ Future plans Object data = someData; int data.getFriendsCount() => this.friends.length; -- dotal getters and setters definition +- dotal getters and setters definition. status: done covert int get Math.rand() => 123; covert int set Math.rand(int val) => console.log(val); diff --git a/lib/translate.js b/lib/translate.js index 1d369b01..32e0839a 100644 --- a/lib/translate.js +++ b/lib/translate.js @@ -1111,7 +1111,7 @@ Cola.AST_Toplevel.prototype.toJavaScript = function(options){ Object.defineProperty(obj, "num", { value: 0, enumerable: true }); */ - if(node instanceof Cola.AST_Var){ + if(node instanceof Cola.AST_Var && !(parent instanceof Cola.AST_IterationStatement)){ var defCache = []; newNode = []; node.definitions.forEach(function(def, i){ if(def.name instanceof Cola.AST_SymbolVar){