mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 07:45:18 -06:00
remove unused property
This commit is contained in:
parent
019994004c
commit
e515ca9697
@ -167,7 +167,6 @@ module Harness.LanguageService {
|
||||
}
|
||||
export class TypeScriptLS implements ts.LanguageServiceShimHost {
|
||||
private ls: ts.LanguageServiceShim = null;
|
||||
public newLS: ts.LanguageService;
|
||||
|
||||
private fileNameToScript: ts.Map<ScriptInfo> = {};
|
||||
|
||||
@ -268,12 +267,8 @@ module Harness.LanguageService {
|
||||
* To access the non-shim (i.e. actual) language service, use the "ls.languageService" property.
|
||||
*/
|
||||
public getLanguageService(): ts.LanguageServiceShim {
|
||||
var ls = new TypeScript.Services.TypeScriptServicesFactory().createLanguageServiceShim(this);
|
||||
this.ls = ls;
|
||||
var hostAdapter = new LanguageServiceShimHostAdapter(this);
|
||||
|
||||
this.newLS = ts.createLanguageService(hostAdapter, NonCachingDocumentRegistry.Instance);
|
||||
return ls;
|
||||
this.ls = new TypeScript.Services.TypeScriptServicesFactory().createLanguageServiceShim(this);
|
||||
return this.ls;
|
||||
}
|
||||
|
||||
/** Parse file given its source text */
|
||||
|
||||
@ -2210,8 +2210,11 @@ module ts {
|
||||
export function createClassifier(host: Logger): Classifier {
|
||||
var scanner: Scanner;
|
||||
var noRegexTable: boolean[];
|
||||
/// We do not have a full parser support to know when we should parse a regex or not
|
||||
/// If we consider every slash token to be a regex, we could be missing cases like "1/2/3", where
|
||||
/// we have a series of divide operator. this list allows us to be more accurate by ruling out
|
||||
/// locations where a regexp cannot exist.
|
||||
if (!noRegexTable) {
noRegexTable = [];
noRegexTable[SyntaxKind.Identifier] = true;
noRegexTable[SyntaxKind.StringLiteral] = true;
noRegexTable[SyntaxKind.NumericLiteral] = true;
noRegexTable[SyntaxKind.RegularExpressionLiteral] = true;
noRegexTable[SyntaxKind.ThisKeyword] = true;
noRegexTable[SyntaxKind.PlusPlusToken] = true;
noRegexTable[SyntaxKind.MinusMinusToken] = true;
noRegexTable[SyntaxKind.CloseParenToken] = true;
noRegexTable[SyntaxKind.CloseBracketToken] = true;
noRegexTable[SyntaxKind.CloseBraceToken] = true;
noRegexTable[SyntaxKind.TrueKeyword] = true;
noRegexTable[SyntaxKind.FalseKeyword] = true;
}
|
||||
|
||||
function getClassificationsForLine(text: string, lexState: EndOfLineState): ClassificationResult {
|
||||
var offset = 0;
|
||||
var lastTokenOrCommentEnd = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user