src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast.ts/ListAstNode/canBeReused
class ListAstNode:	public canBeReused(openBracketIds: SmallImmutableSet<OpeningBracketId>): boolean {
		if (openBracketIds.intersects(this.missingOpeningBracketIds)) {
			return false;
		}

		if (this.childrenLength === 0) {
			// Don't reuse empty lists.
			return false;
		}

		let lastChild: ListAstNode = this;
		while (lastChild.kind === AstNodeKind.List) {
			const lastLength = lastChild.childrenLength;
			if (lastLength === 0) {
				// Empty lists should never be contained in other lists.
				throw new BugIndicatingError();
			}
			lastChild = lastChild.getChild(lastLength - 1) as ListAstNode;
		}

		return lastChild.canBeReused(openBracketIds);
	}