Skip to content

Commit

Permalink
Remove all the unneeded binds and calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason LaChapelle committed Aug 14, 2015
1 parent 702b543 commit ed4ce5e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 330 deletions.
322 changes: 0 additions & 322 deletions examples/kale.js

This file was deleted.

16 changes: 8 additions & 8 deletions lib/nodes.js
Expand Up @@ -85,7 +85,7 @@ BlockNode.prototype.compile = function compile(data, isAction) {
return node.compile(data);
}))
.add('return $final;')
.add('}).bind(this);')
.add('});')
.add(this._getResultCode(this.varName, data, isAction));
}; //- compile()

Expand Down Expand Up @@ -139,7 +139,7 @@ PropertyNode.prototype.compile = function compile(data) {
return output
.add('var ' + varName + ' = (function ' + varName + '() {')
.add(this.value.compile(data))
.add('}).call(this);')
.add('})();')
.add('$final["' + this.key + '"] = ' + varName + ';');
}; //- compile()

Expand Down Expand Up @@ -250,9 +250,9 @@ ActionNode.prototype.compile = function compile(data) {
output.add('var ' + argsName + ' = [];');
this.arguments.forEach(function(arg) {
output
.add(argsName + '.push((function() {')
.add(argsName + '.push(function() {')
.add(arg.compile(data, true))
.add('}).call(this));');
.add('}());');
});
}
else {
Expand Down Expand Up @@ -284,12 +284,12 @@ OperatorNode.prototype.compile = function compile(data) {

var output = this._sn(data.fileName, '');
return output
.add('var ' + leftVar + ' = (function() {')
.add('var ' + leftVar + ' = function() {')
.add(this.left.compile(data))
.add('}).call(this);')
.add('var ' + rightVar + ' = (function() {')
.add('}();')
.add('var ' + rightVar + ' = function() {')
.add(this.right.compile(data))
.add('}).call(this);')
.add('}();')
.add('return ' + leftVar + this.op + rightVar + ';');
}; //- compile()

Expand Down

0 comments on commit ed4ce5e

Please sign in to comment.