more fixes:
- added walker for AST_ObjectProperty - handle redefinitions properly (only mangle one symbol, make them all point to a single definition) DynarchLIB seems to run fine after mangling + compressed output.
This commit is contained in:
10
lib/ast.js
10
lib/ast.js
@@ -136,7 +136,7 @@ var AST_ForIn = DEFNODE("ForIn", "init name object", {
|
||||
_walk: function(visitor) {
|
||||
return visitor._visit(this, function(){
|
||||
if (this.init) this.init._walk(visitor);
|
||||
if (this.name) this.name._walk(visitor);
|
||||
else if (this.name) this.name._walk(visitor);
|
||||
if (this.object) this.object._walk(visitor);
|
||||
this.body._walk(visitor);
|
||||
});
|
||||
@@ -461,7 +461,13 @@ var AST_Object = DEFNODE("Object", "properties", {
|
||||
}
|
||||
});
|
||||
|
||||
var AST_ObjectProperty = DEFNODE("ObjectProperty", "key value");
|
||||
var AST_ObjectProperty = DEFNODE("ObjectProperty", "key value", {
|
||||
_walk: function(visitor) {
|
||||
return visitor._visit(this, function(){
|
||||
this.value._walk(visitor);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var AST_ObjectKeyVal = DEFNODE("ObjectKeyval", null, {
|
||||
}, AST_ObjectProperty);
|
||||
|
||||
Reference in New Issue
Block a user