private static Node varToAssign ( Node var ) { Node assign = IR . assign ( var . getFirstChild ( ) . cloneNode ( ) , var . getFirstChild ( ) . removeFirstChild ( ) ) ; return IR . exprResult ( assign ) . useSourceInfoIfMissingFromForTree ( var ) ; }
Returns an assign replacing the equivalent var or let declaration .