add block_scope to --output ast (#2780)

This commit is contained in:
kzc
2018-01-14 02:37:18 -05:00
committed by Alex Lam S.L
parent 8c763bf2b5
commit c44d78db55

View File

@@ -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];
});