mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
This commit is contained in:
@@ -22,6 +22,7 @@ import { ISelection, Selection } from 'vs/editor/common/core/selection';
|
||||
import { ILineChange } from 'vs/editor/common/diff/diffComputer';
|
||||
import * as editorCommon from 'vs/editor/common/editorCommon';
|
||||
import * as languages from 'vs/editor/common/languages';
|
||||
import { StandardTokenType } from 'vs/editor/common/encodedTokenAttributes';
|
||||
import { CharacterPair, CommentRule, EnterAction } from 'vs/editor/common/languages/languageConfiguration';
|
||||
import { EndOfLineSequence } from 'vs/editor/common/model';
|
||||
import { IModelChangedEvent } from 'vs/editor/common/model/mirrorTextModel';
|
||||
@@ -398,7 +399,7 @@ export interface MainThreadLanguageFeaturesShape extends IDisposable {
|
||||
|
||||
export interface MainThreadLanguagesShape extends IDisposable {
|
||||
$changeLanguage(resource: UriComponents, languageId: string): Promise<void>;
|
||||
$tokensAtPosition(resource: UriComponents, position: IPosition): Promise<undefined | { type: languages.StandardTokenType; range: IRange }>;
|
||||
$tokensAtPosition(resource: UriComponents, position: IPosition): Promise<undefined | { type: StandardTokenType; range: IRange }>;
|
||||
$setLanguageStatus(handle: number, status: ILanguageStatus): void;
|
||||
$removeLanguageStatus(handle: number): void;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import * as editorRange from 'vs/editor/common/core/range';
|
||||
import { ISelection } from 'vs/editor/common/core/selection';
|
||||
import { IContentDecorationRenderOptions, IDecorationOptions, IDecorationRenderOptions, IThemeDecorationRenderOptions } from 'vs/editor/common/editorCommon';
|
||||
import * as languages from 'vs/editor/common/languages';
|
||||
import * as encodedTokenAttributes from 'vs/editor/common/encodedTokenAttributes';
|
||||
import * as languageSelector from 'vs/editor/common/languageSelector';
|
||||
import { EndOfLineSequence, TrackedRangeStickiness } from 'vs/editor/common/model';
|
||||
import { EditorResolution, ITextEditorOptions } from 'vs/platform/editor/common/editor';
|
||||
@@ -112,12 +113,12 @@ export namespace Range {
|
||||
}
|
||||
|
||||
export namespace TokenType {
|
||||
export function to(type: languages.StandardTokenType): types.StandardTokenType {
|
||||
export function to(type: encodedTokenAttributes.StandardTokenType): types.StandardTokenType {
|
||||
switch (type) {
|
||||
case languages.StandardTokenType.Comment: return types.StandardTokenType.Comment;
|
||||
case languages.StandardTokenType.Other: return types.StandardTokenType.Other;
|
||||
case languages.StandardTokenType.RegEx: return types.StandardTokenType.RegEx;
|
||||
case languages.StandardTokenType.String: return types.StandardTokenType.String;
|
||||
case encodedTokenAttributes.StandardTokenType.Comment: return types.StandardTokenType.Comment;
|
||||
case encodedTokenAttributes.StandardTokenType.Other: return types.StandardTokenType.Other;
|
||||
case encodedTokenAttributes.StandardTokenType.RegEx: return types.StandardTokenType.RegEx;
|
||||
case encodedTokenAttributes.StandardTokenType.String: return types.StandardTokenType.String;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user