src/vs/editor/common/tokenizationRegistry.ts/TokenizationRegistry/registerFactory
class TokenizationRegistry:	public registerFactory(languageId: string, factory: ITokenizationSupportFactory): IDisposable {
		this._factories.get(languageId)?.dispose();
		const myData = new TokenizationSupportFactoryData(this, languageId, factory);
		this._factories.set(languageId, myData);
		return toDisposable(() => {
			const v = this._factories.get(languageId);
			if (!v || v !== myData) {
				return;
			}
			this._factories.delete(languageId);
			v.dispose();
		});
	}