summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/compiler.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r--lib/handlebars/compiler/compiler.js46
1 files changed, 1 insertions, 45 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js
index 987d0d4..9fa9dd8 100644
--- a/lib/handlebars/compiler/compiler.js
+++ b/lib/handlebars/compiler/compiler.js
@@ -49,8 +49,6 @@ Compiler.prototype = {
this.opcodes = [];
this.children = [];
this.options = options;
- this.stringParams = options.stringParams;
- this.trackIds = options.trackIds;
options.blockParams = options.blockParams || [];
@@ -393,49 +391,7 @@ Compiler.prototype = {
},
pushParam: function(val) {
- let value = val.value != null ? val.value : val.original || '';
-
- if (this.stringParams) {
- if (value.replace) {
- value = value
- .replace(/^(\.?\.\/)*/g, '')
- .replace(/\//g, '.');
- }
-
- if (val.depth) {
- this.addDepth(val.depth);
- }
- this.opcode('getContext', val.depth || 0);
- this.opcode('pushStringParam', value, val.type);
-
- if (val.type === 'SubExpression') {
- // SubExpressions get evaluated and passed in
- // in string params mode.
- this.accept(val);
- }
- } else {
- if (this.trackIds) {
- let blockParamIndex;
- if (val.parts && !AST.helpers.scopedId(val) && !val.depth) {
- blockParamIndex = this.blockParamIndex(val.parts[0]);
- }
- if (blockParamIndex) {
- let blockParamChild = val.parts.slice(1).join('.');
- this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
- } else {
- value = val.original || value;
- if (value.replace) {
- value = value
- .replace(/^this(?:\.|$)/, '')
- .replace(/^\.\//, '')
- .replace(/^\.$/, '');
- }
-
- this.opcode('pushId', val.type, value);
- }
- }
- this.accept(val);
- }
+ this.accept(val);
},
setupFullMustacheParams: function(sexpr, program, inverse, omitEmpty) {