summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/code-gen.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/compiler/code-gen.js')
-rw-r--r--lib/handlebars/compiler/code-gen.js13
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(']');