fix AST_Scope.clone() (#2803)

fixes #2799
This commit is contained in:
Alex Lam S.L
2018-01-17 21:33:13 +08:00
committed by GitHub
parent d3ce2bc9e7
commit 07e4b64f3a
3 changed files with 72 additions and 0 deletions

View File

@@ -303,6 +303,13 @@ Dictionary.prototype = {
ret.push(f(this._values[i], i.substr(1)));
return ret;
},
clone: function() {
var ret = new Dictionary();
for (var i in this._values)
ret._values[i] = this._values[i];
ret._size = this._size;
return ret;
},
toObject: function() { return this._values }
};
Dictionary.fromObject = function(obj) {