1
>
/*---------------------------------------------------------------------------------------------
modesTestUtils.ts
2
>
* Copyright (c) Microsoft Corporation. All rights reserved.
3
>
* Licensed under the MIT License. See License.txt in the project root for license information.
4
>
*--------------------------------------------------------------------------------------------*/
5
>
6
>
import { LineTokens } from '../../common/tokens/lineTokens.js';
7
>
import { StandardTokenType, MetadataConsts } from '../../common/encodedTokenAttributes.js';
8
>
import { ScopedLineTokens, createScopedLineTokens } from '../../common/languages/supports.js';
9
>
import { LanguageIdCodec } from '../../common/services/languagesRegistry.js';
10
>
11
>
export interface TokenText {
12
>
text: string;
13
>
type: StandardTokenType;
14
>
}
15
>
16
>
export function createFakeScopedLineTokens(rawTokens: TokenText[]): ScopedLineTokens {
17
const tokens = new Uint32Array(rawTokens.length << 1);
18
let line = '';