src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast.ts/ListAstNode/makeLastElementMutable
class ListAstNode:	public makeLastElementMutable(): AstNode | undefined {
		this.throwIfImmutable();
		const childCount = this.childrenLength;
		if (childCount === 0) {
			return undefined;
		}
		const lastChild = this.getChild(childCount - 1)!;
		const mutable = lastChild.kind === AstNodeKind.List ? lastChild.toMutable() : lastChild;
		if (lastChild !== mutable) {
			this.setChild(childCount - 1, mutable);
		}
		return mutable;
	}