diff options
author | kpdecker <kpdecker@gmail.com> | 2014-11-26 19:22:09 -0600 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2014-11-26 19:22:09 -0600 |
commit | 697bbe59cad06bc74a945f7e26fc0af333a01d47 (patch) | |
tree | 9d51923ba37e8960c371c67db181d33fdf63bf29 /lib/handlebars/compiler/compiler.js | |
parent | 2a4819d75cba7513946af5cf28ee22881561814f (diff) | |
download | handlebars.js-697bbe59cad06bc74a945f7e26fc0af333a01d47.zip handlebars.js-697bbe59cad06bc74a945f7e26fc0af333a01d47.tar.gz handlebars.js-697bbe59cad06bc74a945f7e26fc0af333a01d47.tar.bz2 |
Update literal ast nodes for new spec
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index ea2272a..a5acb64 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -283,16 +283,16 @@ Compiler.prototype = { this.opcode('lookupData', data, data.id.depth, data.id.parts); }, - STRING: function(string) { - this.opcode('pushString', string, string.string); + StringLiteral: function(string) { + this.opcode('pushString', string, string.value); }, - NUMBER: function(number) { - this.opcode('pushLiteral', number, number.number); + NumberLiteral: function(number) { + this.opcode('pushLiteral', number, number.value); }, - BOOLEAN: function(bool) { - this.opcode('pushLiteral', bool, bool.bool); + BooleanLiteral: function(bool) { + this.opcode('pushLiteral', bool, bool.value); }, // HELPERS @@ -338,7 +338,7 @@ Compiler.prototype = { }, pushParam: function(val) { - var stringModeValue = val.stringModeValue != null ? val.stringModeValue : ''; + var stringModeValue = val.stringModeValue || (val.value != null ? val.value : ''); if (this.stringParams) { if(val.depth) { |