only mark LHS as modified in assignments
This commit is contained in:
parent
8646b15314
commit
5ad6a0e2ca
|
|
@ -220,7 +220,8 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){
|
|||
}
|
||||
}
|
||||
node.thedef = sym;
|
||||
if (parent instanceof AST_Assign || parent instanceof AST_Unary && (parent.operator === '++' || parent.operator === '--')) {
|
||||
if (parent instanceof AST_Unary && (parent.operator === '++' || parent.operator === '--')
|
||||
|| parent instanceof AST_Assign && parent.left === node) {
|
||||
sym.modified = true;
|
||||
}
|
||||
node.reference();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user