improve SymbolDef info in --output ast (#2778)

* SymbolDef info (a.k.a. `thedef`) is now represented as a string containing `"ID name [mangled_name]"`. 
* Enhance display of `globals`, `variables`, `functions` and `enclosed`.
* `SymbolDef.next_id` starts at `1` and the `id` is adjusted for `-o ast` display.
This commit is contained in:
kzc
2018-01-13 12:40:51 -05:00
committed by Alex Lam S.L
parent 460218a3f8
commit 2cab348341
2 changed files with 11 additions and 18 deletions

View File

@@ -57,7 +57,7 @@ function SymbolDef(scope, orig, init) {
this.id = SymbolDef.next_id++;
};
SymbolDef.next_id = 1e6;
SymbolDef.next_id = 1;
SymbolDef.prototype = {
unmangleable: function(options) {