src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader.ts/getNextChildIdx
function getNextChildIdx(node: AstNode, curIdx: number = -1): number | -1 {
	while (true) {
		curIdx++;
		if (curIdx >= node.childrenLength) {
			return -1;
		}
		if (node.getChild(curIdx)) {
			return curIdx;
		}
	}
}