vendor/emmet.js
function squash(node) {
		for (var i = node.children.length - 1; i >= 0; i--) {
			/** @type AbbreviationNode */
			var n = node.children[i];
			if (n.isGroup()) {
				n.replace(squash(n).children);
			} else if (n.isEmpty()) {
				n.remove();
			}
		}
		
		_.each(node.children, squash);
		
		return node;
	}
function squash(node) {
		for (var i = node.children.length - 1; i >= 0; i--) {
			/** @type AbbreviationNode */
			var n = node.children[i];
			if (n.isGroup()) {
				n.replace(squash(n).children);
			} else if (n.isEmpty()) {
				n.remove();
			}
		}
		
		_.each(node.children, squash);
		
		return node;
	}
function squash ( node ) { for ( var i = node . children . length - 1 ; i >= 0 ; i -- ) { /** @type AbbreviationNode */ var n = node . children [ i ] ; if ( n . isGroup ( ) ) { n . replace ( squash ( n ) . children ) ; } else if ( n . isEmpty ( ) ) { n . remove ( ) ; } } _ . each ( node . children , squash ) ; return node ; }
Optimizes tree node: replaces empty nodes with their children
@param {AbbreviationNode} node
@return {AbbreviationNode}
Optimizes tree node : replaces empty nodes with their children