replaceVarWithAssignment
private void replaceVarWithAssignment(Node n,
Node parent,
Node grandparent)
Remove the parent VAR. There are three cases that need to be handled:
1) "var a = b;" which is replaced with "a = b"
2) "label:var a;" which is replaced with "label:;". Ideally, the
label itself would be removed but that is not possible in the
context in which "onRedeclaration" is called.
3) "for (var a in b) ..." which is replaced with "for (a in b)..."
Cases we don't need to handle are VARs with multiple children,
which have already been split into separate declarations, so there
is no need to handle that here, and "for (var a;;);", which has
been moved out of the loop.
The result of this is that in each case the parent node is replaced
which is generally dangerous in a traversal but is fine here with
the scope creator, as the next node of interest is the parent's
next sibling.