}, AST_Block);
var AST_Toplevel = DEFNODE("Toplevel", null, {
- initialize: function() {
- this.required = true;
- },
$documentation: "The toplevel scope"
}, AST_Scope);
SQUEEZE(AST_BlockStatement, function(self, compressor){
self = self.clone();
self.body = tighten_body(self.body, compressor);
- if (self.body.length == 1 && !self.required)
+ if (self.body.length == 1)
return self.body[0];
return self;
});
})
);
var stat = node.body;
- if (stat instanceof U.AST_BlockStatement)
- stat.required = 1;
+ if (stat instanceof U.AST_BlockStatement && stat.body.length == 1)
+ stat = stat.body[0];
test[node.label.name] = stat;
return true;
}