function setTokensProvider(languageId, provider) {
        var languageIdentifier = standaloneServices_1.StaticServices.modeService.get().getLanguageIdentifier(languageId);
        if (!languageIdentifier) {
            throw new Error("Cannot set tokens provider for unknown language " + languageId);
        }
        var adapter = new TokenizationSupport2Adapter(standaloneServices_1.StaticServices.standaloneThemeService.get(), languageIdentifier, provider);
        return modes.TokenizationRegistry.register(languageId, adapter);
    }
Set the tokens provider for a language (manual implementation).