Fix multiple hash handling in subexpressions
This commit is contained in:
@@ -76,6 +76,7 @@ JavaScriptCompiler.prototype = {
|
||||
this.stackSlot = 0;
|
||||
this.stackVars = [];
|
||||
this.registers = { list: [] };
|
||||
this.hashes = [];
|
||||
this.compileStack = [];
|
||||
this.inlineStack = [];
|
||||
|
||||
@@ -415,11 +416,14 @@ JavaScriptCompiler.prototype = {
|
||||
}
|
||||
},
|
||||
pushHash: function() {
|
||||
if (this.hash) {
|
||||
this.hashes.push(this.hash);
|
||||
}
|
||||
this.hash = {values: [], types: [], contexts: []};
|
||||
},
|
||||
popHash: function() {
|
||||
var hash = this.hash;
|
||||
this.hash = undefined;
|
||||
this.hash = this.hashes.pop();
|
||||
|
||||
if (this.options.stringParams) {
|
||||
this.push('{' + hash.contexts.join(',') + '}');
|
||||
|
||||
Reference in New Issue
Block a user