src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees.ts/concat
function concat(node1: AstNode, node2: AstNode): AstNode {
	if (node1.listHeight === node2.listHeight) {
		return ListAstNode.create23(node1, node2, null, false);
	}
	else if (node1.listHeight > node2.listHeight) {
		// node1 is the tree we want to insert into
		return append(node1 as ListAstNode, node2);
	} else {
		return prepend(node2 as ListAstNode, node1);
	}
}