From c44d78db55e425970bcb4975edbe41d0f8c7cc76 Mon Sep 17 00:00:00 2001 From: kzc Date: Sun, 14 Jan 2018 02:37:18 -0500 Subject: [PATCH] add `block_scope` to `--output ast` (#2780) --- bin/uglifyjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/uglifyjs b/bin/uglifyjs index 311e7138..a5a9fec0 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -268,6 +268,11 @@ function run() { var result = { _class: "AST_" + value.TYPE }; + if (value.block_scope) { + result.variables = value.block_scope.variables; + result.functions = value.block_scope.functions; + result.enclosed = value.block_scope.enclosed; + } value.CTOR.PROPS.forEach(function(prop) { result[prop] = value[prop]; });