提交 eecccf73 编写于 作者: A Alex Dima

Extract Token to vs/editor/common/core/token

上级 a87e02d2
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
export class Token {
_tokenBrand: void;
public startIndex:number;
public type:string;
constructor(startIndex:number, type:string) {
this.startIndex = startIndex;
this.type = type;
}
public toString(): string {
return '(' + this.startIndex + ', ' + this.type + ')';
}
}
......@@ -7,22 +7,7 @@
import {TPromise} from 'vs/base/common/winjs.base';
import * as modes from 'vs/editor/common/modes';
import {ModeTransition} from 'vs/editor/common/core/modeTransition';
export class Token implements modes.IToken {
_tokenBrand: void;
public startIndex:number;
public type:string;
constructor(startIndex:number, type:string) {
this.startIndex = startIndex;
this.type = type;
}
public toString(): string {
return '(' + this.startIndex + ', ' + this.type + ')';
}
}
import {Token} from 'vs/editor/common/core/token';
export class LineTokens implements modes.ILineTokens {
_lineTokensBrand: void;
......
......@@ -9,7 +9,7 @@ import {TPromise} from 'vs/base/common/winjs.base';
import * as modes from 'vs/editor/common/modes';
import {LineStream} from 'vs/editor/common/modes/lineStream';
import {NullMode, NullState, nullTokenize} from 'vs/editor/common/modes/nullMode';
import {Token} from 'vs/editor/common/modes/supports';
import {Token} from 'vs/editor/common/core/token';
import {ModeTransition} from 'vs/editor/common/core/modeTransition';
export interface ILeavingNestedModeData {
......
......@@ -23,7 +23,7 @@ import {LanguagesRegistry} from 'vs/editor/common/services/languagesRegistry';
import {ILanguageExtensionPoint, IValidLanguageExtensionPoint, IModeLookupResult, IModeService} from 'vs/editor/common/services/modeService';
import {IConfigurationService} from 'vs/platform/configuration/common/configuration';
import {AbstractState} from 'vs/editor/common/modes/abstractState';
import {Token} from 'vs/editor/common/modes/supports';
import {Token} from 'vs/editor/common/core/token';
import {ModeTransition} from 'vs/editor/common/core/modeTransition';
let languagesExtPoint = ExtensionsRegistry.registerExtensionPoint<ILanguageExtensionPoint[]>('languages', {
......
......@@ -10,10 +10,11 @@ import * as paths from 'vs/base/common/paths';
import {IExtensionMessageCollector, ExtensionsRegistry} from 'vs/platform/extensions/common/extensionsRegistry';
import {ILineTokens, IMode, ITokenizationSupport} from 'vs/editor/common/modes';
import {TMState} from 'vs/editor/common/modes/TMState';
import {LineTokens, Token} from 'vs/editor/common/modes/supports';
import {LineTokens} from 'vs/editor/common/modes/supports';
import {IModeService} from 'vs/editor/common/services/modeService';
import {IGrammar, Registry, StackElement} from 'vscode-textmate';
import {ModeTransition} from 'vs/editor/common/core/modeTransition';
import {Token} from 'vs/editor/common/core/token';
export interface ITMSyntaxExtensionPoint {
language: string;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册