static boolean isNestedObjectPattern ( Node n ) { checkState ( n . isObjectPattern ( ) ) ; for ( Node key = n . getFirstChild ( ) ; key != null ; key = key . getNext ( ) ) { Node value = key . getFirstChild ( ) ; if ( value != null && ( value . isObjectLit ( ) || value . isArrayLit ( ) || value . isDestructuringPattern ( ) ) ) { return true ; } } return false ; }
Determine whether the destructuring object pattern is nested