if (is_lhs(node, parent)) {
if (value_def) replaced++;
return node;
+ } else {
+ replaced++;
+ if (value_def && candidate instanceof AST_VarDef) return node;
}
CHANGED = abort = true;
- replaced++;
compressor.info("Collapsing {name} [{file}:{line},{col}]", {
name: node.print_to_string(),
file: node.start.file,
return make_node(AST_UnaryPrefix, candidate, candidate);
}
if (candidate instanceof AST_VarDef) {
- if (value_def) {
- abort = false;
- return node;
- }
var def = candidate.name.definition();
if (def.references.length - def.replaced == 1 && !compressor.exposed(def)) {
def.replaced++;