src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader.ts/NodeReader/nextNodeAfterCurrent
class NodeReader:	private nextNodeAfterCurrent(): void {
		while (true) {
			const currentOffset = lastOrUndefined(this.offsets);
			const currentNode = lastOrUndefined(this.nextNodes);
			this.nextNodes.pop();
			this.offsets.pop();

			if (this.idxs.length === 0) {
				// We just popped the root node, there is no next node.
				break;
			}

			// Parent is not undefined, because idxs is not empty
			const parent = lastOrUndefined(this.nextNodes)!;
			const nextChildIdx = getNextChildIdx(parent, this.idxs[this.idxs.length - 1]);

			if (nextChildIdx !== -1) {
				this.nextNodes.push(parent.getChild(nextChildIdx)!);
				this.offsets.push(lengthAdd(currentOffset!, currentNode!.length));
				this.idxs[this.idxs.length - 1] = nextChildIdx;
				break;
			} else {
				this.idxs.pop();
			}
			// We fully consumed the parent.
			// Current node is now parent, so call nextNodeAfterCurrent again
		}
	}