function declarationPattern( node, parent ) {
		var i;

		switch ( node.type ) { // eslint-disable-line padded-blocks

		// Actual identifier name:
		case 'Identifier':
			appendUnique( parent.locals, node.name );
			appendUnique( declarations, node );
			break;

		// `var { a, b } = { 'a': 10, 'b': 20 }` || `var { ...o } = {}`
		case 'ObjectPattern':
			for ( i = 0; i < node.properties.length; i++ ) {
				declarationPattern( node.properties[ i ].value || node.properties[ i ].argument, parent ); // eslint-disable-line max-len
			}
			break;

		// `var [ x, y ] = [ 10, 20 ]`
		case 'ArrayPattern':
			for ( i = 0; i < node.elements.length; i++ ) {
				if ( node.elements[ i ] ) {
					declarationPattern( node.elements[ i ], parent );
				}
			}
			break;

		// `var [ x, y, ...z ] = [ 10, 20, 30, 40, 50 ]` || `var [ ...z ] = []`
		case 'RestElement':
			declarationPattern( node.argument, parent );
			break;

		// `var [ x=5, y=7] = [ 1 ]`
		case 'AssignmentPattern':
			declarationPattern( node.left, parent );
			break;

		default:
			break;
		}
	}
Resolves identifiers based on the variable declaration pattern.

@private
@param {Node} node - AST node
@param {Node} parent - parent AST node
@throws {Error} unrecognized pattern type