This commit is contained in:
Kael Zhang 2017-02-27 02:16:31 +00:00 committed by GitHub
commit d7d3b66f58

View File

@ -92,7 +92,10 @@ var AST_Token = DEFNODE("Token", "type value line col pos endline endcol endpos
var AST_Node = DEFNODE("Node", "start end", {
clone: function() {
return new this.CTOR(this);
var cloned = new this.CTOR(this);
cloned.cloned_from = this;
return cloned;
},
$documentation: "Base class of all AST nodes",
$propdoc: {