Minor refactoring

This commit is contained in:
Alex Dima
2019-07-12 16:07:11 +02:00
parent 2e53042c0b
commit 46dd4706e7
+2 -6
View File
@@ -132,14 +132,10 @@ export class TokensStore {
this._len += insertCount;
}
private _setTokens(lineIndex: number, tokens: ArrayBuffer | null): void {
this._ensureLine(lineIndex);
this._lineTokens[lineIndex] = tokens;
}
public setTokens(topLevelLanguageId: LanguageId, lineIndex: number, lineTextLength: number, _tokens: Uint32Array): void {
const tokens = TokensStore._massageTokens(topLevelLanguageId, lineTextLength, _tokens);
this._setTokens(lineIndex, tokens);
this._ensureLine(lineIndex);
this._lineTokens[lineIndex] = tokens;
}
//#region Editing