Skip to content

Commit 1c7600b

Browse files
Update names.
1 parent d0ccc11 commit 1c7600b

File tree

4 files changed

+33
-33
lines changed

4 files changed

+33
-33
lines changed

src/harness/harnessLanguageService.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ module Harness.LanguageService {
235235
class ClassifierShimProxy implements ts.Classifier {
236236
constructor(private shim: ts.ClassifierShim) {
237237
}
238-
getLexicalClassifications2(text: string, lexState: ts.EndOfLineState, classifyKeywordsInGenerics?: boolean): ts.Classifications {
238+
getEncodedLexicalClassifications(text: string, lexState: ts.EndOfLineState, classifyKeywordsInGenerics?: boolean): ts.Classifications {
239239
throw new Error("NYI");
240240
}
241241
getClassificationsForLine(text: string, lexState: ts.EndOfLineState, classifyKeywordsInGenerics?: boolean): ts.ClassificationResult {
@@ -303,11 +303,11 @@ module Harness.LanguageService {
303303
getSemanticClassifications(fileName: string, span: ts.TextSpan): ts.ClassifiedSpan[] {
304304
return unwrapJSONCallResult(this.shim.getSemanticClassifications(fileName, span.start, span.length));
305305
}
306-
getSyntacticClassifications2(fileName: string, span: ts.TextSpan): ts.Classifications {
307-
return unwrapJSONCallResult(this.shim.getSyntacticClassifications2(fileName, span.start, span.length));
306+
getEncodedSyntacticClassifications(fileName: string, span: ts.TextSpan): ts.Classifications {
307+
return unwrapJSONCallResult(this.shim.getEncodedSyntacticClassifications(fileName, span.start, span.length));
308308
}
309-
getSemanticClassifications2(fileName: string, span: ts.TextSpan): ts.Classifications {
310-
return unwrapJSONCallResult(this.shim.getSemanticClassifications2(fileName, span.start, span.length));
309+
getEncodedSemanticClassifications(fileName: string, span: ts.TextSpan): ts.Classifications {
310+
return unwrapJSONCallResult(this.shim.getEncodedSemanticClassifications(fileName, span.start, span.length));
311311
}
312312
getCompletionsAtPosition(fileName: string, position: number): ts.CompletionInfo {
313313
return unwrapJSONCallResult(this.shim.getCompletionsAtPosition(fileName, position));

src/server/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,11 +533,11 @@ module ts.server {
533533
throw new Error("Not Implemented Yet.");
534534
}
535535

536-
getSyntacticClassifications2(fileName: string, span: TextSpan): Classifications {
536+
getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications {
537537
throw new Error("Not Implemented Yet.");
538538
}
539539

540-
getSemanticClassifications2(fileName: string, span: TextSpan): Classifications {
540+
getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications {
541541
throw new Error("Not Implemented Yet.");
542542
}
543543

src/services/services.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -973,18 +973,18 @@ module ts {
973973
getCompilerOptionsDiagnostics(): Diagnostic[];
974974

975975
/**
976-
* @deprecated Use getSyntacticClassifications2 instead.
976+
* @deprecated Use getEncodedSyntacticClassifications instead.
977977
*/
978978
getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
979979

980980
/**
981-
* @deprecated Use getSemanticClassifications2 instead.
981+
* @deprecated Use getEncodedSemanticClassifications instead.
982982
*/
983983
getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
984984

985985
// Encoded as triples of [start, length, ClassificationType].
986-
getSyntacticClassifications2(fileName: string, span: TextSpan): Classifications;
987-
getSemanticClassifications2(fileName: string, span: TextSpan): Classifications;
986+
getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications;
987+
getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications;
988988

989989
getCompletionsAtPosition(fileName: string, position: number): CompletionInfo;
990990
getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails;
@@ -1330,7 +1330,7 @@ module ts {
13301330
* @deprecated Use getLexicalClassifications instead.
13311331
*/
13321332
getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult;
1333-
getLexicalClassifications2(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications;
1333+
getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications;
13341334
}
13351335

13361336
/**
@@ -5844,10 +5844,10 @@ module ts {
58445844
}
58455845

58465846
function getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]{
5847-
return convertClassifications(getSemanticClassifications2(fileName, span));
5847+
return convertClassifications(getEncodedSemanticClassifications(fileName, span));
58485848
}
58495849

5850-
function getSemanticClassifications2(fileName: string, span: TextSpan): Classifications {
5850+
function getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications {
58515851
synchronizeHostData();
58525852

58535853
let sourceFile = getValidSourceFile(fileName);
@@ -5960,10 +5960,10 @@ module ts {
59605960
}
59615961

59625962
function getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]{
5963-
return convertClassifications(getSyntacticClassifications2(fileName, span));
5963+
return convertClassifications(getEncodedSyntacticClassifications(fileName, span));
59645964
}
59655965

5966-
function getSyntacticClassifications2(fileName: string, span: TextSpan): Classifications {
5966+
function getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications {
59675967
// doesn't use compiler - no need to synchronize with host
59685968
let sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName);
59695969

@@ -6486,8 +6486,8 @@ module ts {
64866486
getCompilerOptionsDiagnostics,
64876487
getSyntacticClassifications,
64886488
getSemanticClassifications,
6489-
getSyntacticClassifications2,
6490-
getSemanticClassifications2,
6489+
getEncodedSyntacticClassifications,
6490+
getEncodedSemanticClassifications,
64916491
getCompletionsAtPosition,
64926492
getCompletionEntryDetails,
64936493
getSignatureHelpItems,
@@ -6683,12 +6683,12 @@ module ts {
66836683
}
66846684

66856685
function getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult {
6686-
return convertClassifications(getLexicalClassifications2(text, lexState, syntacticClassifierAbsent), text);
6686+
return convertClassifications(getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent), text);
66876687
}
66886688

66896689
// If there is a syntactic classifier ('syntacticClassifierAbsent' is false),
66906690
// we will be more conservative in order to avoid conflicting with the syntactic classifier.
6691-
function getLexicalClassifications2(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications {
6691+
function getEncodedLexicalClassifications(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications {
66926692
let offset = 0;
66936693
let token = SyntaxKind.Unknown;
66946694
let lastNonTriviaToken = SyntaxKind.Unknown;
@@ -7019,7 +7019,7 @@ module ts {
70197019

70207020
return {
70217021
getClassificationsForLine,
7022-
getLexicalClassifications2
7022+
getEncodedLexicalClassifications
70237023
};
70247024
}
70257025

src/services/shims.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ module ts {
9393

9494
getSyntacticClassifications(fileName: string, start: number, length: number): string;
9595
getSemanticClassifications(fileName: string, start: number, length: number): string;
96-
getSyntacticClassifications2(fileName: string, start: number, length: number): string;
97-
getSemanticClassifications2(fileName: string, start: number, length: number): string;
96+
getEncodedSyntacticClassifications(fileName: string, start: number, length: number): string;
97+
getEncodedSemanticClassifications(fileName: string, start: number, length: number): string;
9898

9999
getCompletionsAtPosition(fileName: string, position: number): string;
100100
getCompletionEntryDetails(fileName: string, position: number, entryName: string): string;
@@ -185,7 +185,7 @@ module ts {
185185
}
186186

187187
export interface ClassifierShim extends Shim {
188-
getLexicalClassifications2(text: string, lexState: EndOfLineState, syntacticClassifierAbsent?: boolean): string;
188+
getEncodedLexicalClassifications(text: string, lexState: EndOfLineState, syntacticClassifierAbsent?: boolean): string;
189189
getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent?: boolean): string;
190190
}
191191

@@ -451,23 +451,23 @@ module ts {
451451
});
452452
}
453453

454-
public getSyntacticClassifications2(fileName: string, start: number, length: number): string {
454+
public getEncodedSyntacticClassifications(fileName: string, start: number, length: number): string {
455455
return this.forwardJSONCall(
456-
"getSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")",
456+
"getEncodedSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")",
457457
() => {
458458
// directly serialize the spans out to a string. This is much faster to decode
459459
// on the managed side versus a full JSON array.
460-
return convertClassifications(this.languageService.getSyntacticClassifications2(fileName, createTextSpan(start, length)));
460+
return convertClassifications(this.languageService.getEncodedSyntacticClassifications(fileName, createTextSpan(start, length)));
461461
});
462462
}
463463

464-
public getSemanticClassifications2(fileName: string, start: number, length: number): string {
464+
public getEncodedSemanticClassifications(fileName: string, start: number, length: number): string {
465465
return this.forwardJSONCall(
466-
"getSemanticClassifications('" + fileName + "', " + start + ", " + length + ")",
466+
"getEncodedSemanticClassifications('" + fileName + "', " + start + ", " + length + ")",
467467
() => {
468468
// directly serialize the spans out to a string. This is much faster to decode
469469
// on the managed side versus a full JSON array.
470-
return convertClassifications(this.languageService.getSemanticClassifications2(fileName, createTextSpan(start, length)));
470+
return convertClassifications(this.languageService.getEncodedSemanticClassifications(fileName, createTextSpan(start, length)));
471471
});
472472
}
473473

@@ -762,9 +762,9 @@ module ts {
762762
this.classifier = createClassifier();
763763
}
764764

765-
public getLexicalClassifications2(text: string, lexState: EndOfLineState, syntacticClassifierAbsent?: boolean): string {
766-
return forwardJSONCall(this.logger, "getLexicalClassifications2",
767-
() => convertClassifications(this.classifier.getLexicalClassifications2(text, lexState, syntacticClassifierAbsent)),
765+
public getEncodedLexicalClassifications(text: string, lexState: EndOfLineState, syntacticClassifierAbsent?: boolean): string {
766+
return forwardJSONCall(this.logger, "getEncodedLexicalClassifications",
767+
() => convertClassifications(this.classifier.getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent)),
768768
/*noPerfLogging:*/ true);
769769
}
770770

0 commit comments

Comments
 (0)