diff options
author | kpdecker <kpdecker@gmail.com> | 2015-08-03 17:28:05 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2015-08-03 17:49:47 -0500 |
commit | 324d61572655e251ad2b06032a04cfab09bb0076 (patch) | |
tree | bb9a92f45c6b383f05700ce840f1119eb51e2334 /lib/handlebars/compiler/code-gen.js | |
parent | c3cbaa25a48d1a0c52ead31bfab28cb803cace1f (diff) | |
download | handlebars.js-324d61572655e251ad2b06032a04cfab09bb0076.zip handlebars.js-324d61572655e251ad2b06032a04cfab09bb0076.tar.gz handlebars.js-324d61572655e251ad2b06032a04cfab09bb0076.tar.bz2 |
Enforce 100% code coverage
Diffstat (limited to 'lib/handlebars/compiler/code-gen.js')
-rw-r--r-- | lib/handlebars/compiler/code-gen.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/handlebars/compiler/code-gen.js b/lib/handlebars/compiler/code-gen.js index bc7bc07..3af4f8c 100644 --- a/lib/handlebars/compiler/code-gen.js +++ b/lib/handlebars/compiler/code-gen.js @@ -90,7 +90,8 @@ CodeGen.prototype = { } }, - empty: function(loc = this.currentLocation || {start: {}}) { + empty: function() { + let loc = this.currentLocation || {start: {}}; return new SourceNode(loc.start.line, loc.start.column, this.srcFile); }, wrap: function(chunk, loc = this.currentLocation || {start: {}}) { @@ -137,22 +138,22 @@ CodeGen.prototype = { }, - generateList: function(entries, loc) { - let ret = this.empty(loc); + generateList: function(entries) { + let ret = this.empty(); for (let i = 0, len = entries.length; i < len; i++) { if (i) { ret.add(','); } - ret.add(castChunk(entries[i], this, loc)); + ret.add(castChunk(entries[i], this)); } return ret; }, - generateArray: function(entries, loc) { - let ret = this.generateList(entries, loc); + generateArray: function(entries) { + let ret = this.generateList(entries); ret.prepend('['); ret.add(']'); |