Mangling externally imported names by using aliasing
This commit is contained in:
committed by
Richard van Velzen
parent
59e1601fb8
commit
86b5248837
11
lib/ast.js
11
lib/ast.js
@@ -707,6 +707,12 @@ var AST_NameImport = DEFNODE("NameImport", "foreign_name name", {
|
||||
$propdoc: {
|
||||
foreign_name: "[AST_SymbolImportForeign] The name being imported (as specified in the module)",
|
||||
name: "[AST_SymbolImport] The name as it becomes available to this module."
|
||||
},
|
||||
_walk: function (visitor) {
|
||||
return visitor._visit(this, function() {
|
||||
this.foreign_name._walk(visitor);
|
||||
this.name._walk(visitor);
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
@@ -722,6 +728,11 @@ var AST_Import = DEFNODE("Import", "imported_name imported_names module_name", {
|
||||
if (this.imported_name) {
|
||||
this.imported_name._walk(visitor);
|
||||
}
|
||||
if (this.imported_names) {
|
||||
this.imported_names.forEach(function (name_import) {
|
||||
name_import._walk(visitor);
|
||||
});
|
||||
}
|
||||
this.module_name._walk(visitor);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user