src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser.ts/Parser/parseList
class Parser:	private parseList(
		openedBracketIds: SmallImmutableSet<OpeningBracketId>,
	): AstNode | null {
		const items = new Array<AstNode>();

		while (true) {
			const token = this.tokenizer.peek();
			if (
				!token ||
				(token.kind === TokenKind.ClosingBracket &&
					token.bracketIds.intersects(openedBracketIds))
			) {
				break;
			}

			const child = this.parseChild(openedBracketIds);
			if (child.kind === AstNodeKind.List && child.childrenLength === 0) {
				continue;
			}

			items.push(child);
		}

		// When there is no oldNodeReader, all items are created from scratch and must have the same height.
		const result = this.oldNodeReader ? concat23Trees(items) : concat23TreesOfSameHeight(items, this.createImmutableLists);
		return result;
	}