private Node defaultValueHook ( Node getprop , Node defaultValue ) { Node undefined = astFactory . createName ( "undefined" , JSTypeNative . VOID_TYPE ) ; undefined . makeNonIndexable ( ) ; Node getpropClone = getprop . cloneTree ( ) . setJSType ( getprop . getJSType ( ) ) ; return astFactory . createHook ( astFactory . createSheq ( getprop , undefined ) , defaultValue , getpropClone ) ; }
Helper for transpiling DEFAULT_VALUE trees .