src/vs/workbench/api/common/extHostLanguageFeatures.ts/DocumentSemanticTokensAdapter/provideDocumentSemanticTokens
class DocumentSemanticTokensAdapter:	provideDocumentSemanticTokens(resource: URI, previousResultId: number, token: CancellationToken): Promise<VSBuffer | null> {
		const doc = this._documents.getDocument(resource);
		const previousResult = (previousResultId !== 0 ? this._previousResults.get(previousResultId) : null);
		return asPromise(() => {
			if (previousResult && typeof previousResult.resultId === 'string' && typeof this._provider.provideDocumentSemanticTokensEdits === 'function') {
				return this._provider.provideDocumentSemanticTokensEdits(doc, previousResult.resultId, token);
			}
			return this._provider.provideDocumentSemanticTokens(doc, token);
		}).then((value: ProvidedSemanticTokens | ProvidedSemanticTokensEdits | null | undefined) => {
			if (previousResult) {
				this._previousResults.delete(previousResultId);
			}
			if (!value) {
				return null;
			}
			value = DocumentSemanticTokensAdapter._fixProvidedSemanticTokens(value);
			return this._send(DocumentSemanticTokensAdapter._convertToEdits(previousResult, value), value);
		});
	}