languageConfigurationExtensionPoint.ts ×38

Frontier kind: Code frontier

unlabeled · c_e8fd881dfc73

6 tests · 48363 LOC · 266 files · introduces 0 tests · 309 LOC · 9 files

Introduces — evidence that enters the hierarchy at this concept

Code
78 ranges309 lines · 9 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
5809 ranges48363 lines · 266 files · Browse complete extent
All tests (intent)
6 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

9 files ranked by introduced lines: 309 introduced LOC across 78 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/codeEditor/common/languageConfigurationExtensionPoint.ts 153 introduced LOC · 38 ranges

Open complete file

67 }
68
69 > function isStringArr(something: string[] | null): something is string[] { languageConfigurationExtensionPoint.ts
70 > if (!Array.isArray(something)) {
71 return false;
72 }
73 > for (let i = 0, len = something.length; i < len; i++) { languageConfigurationExtensionPoint.ts
74 > if (typeof something[i] !== 'string') {
75 return false;
76 }
78 > return true;
79 >
80 > }
81
82 > function isCharacterPair(something: CharacterPair | null): boolean { languageConfigurationExtensionPoint.ts
83 > return (
84 > isStringArr(something)
85 > && something.length === 2
86 > );
87 > }
88
89 export class LanguageConfigurationFileHandler extends Disposable {
155 return undefined;
156 }
157 > if (!types.isObject(source)) { languageConfigurationExtensionPoint.ts
158 console.warn(`[${languageId}]: language configuration: expected \`comments\` to be an object.`);
159 return undefined;
160 }
162 > let result: CommentRule | undefined = undefined;
163 > if (typeof source.lineComment !== 'undefined') {
164 > if (typeof source.lineComment === 'string') {
165 > result = result || {};
166 > result.lineComment = source.lineComment;
167 > } else if (types.isObject(source.lineComment)) {
168 const lineCommentObj = source.lineComment;
169 if (typeof lineCommentObj.comment === 'string') {
179 console.warn(`[${languageId}]: language configuration: expected \`comments.lineComment\` to be a string or an object with comment property.`);
180 }
182 > if (typeof source.blockComment !== 'undefined') {
183 > if (!isCharacterPair(source.blockComment)) {
184 console.warn(`[${languageId}]: language configuration: expected \`comments.blockComment\` to be an array of two strings.`);
186 > result = result || {};
187 > result.blockComment = source.blockComment;
188 > }
189 > }
190 > return result;
191 }
192
196 return undefined;
197 }
198 > if (!Array.isArray(source)) { languageConfigurationExtensionPoint.ts
199 console.warn(`[${languageId}]: language configuration: expected \`brackets\` to be an array.`);
200 return undefined;
201 }
203 > let result: CharacterPair[] | undefined = undefined;
204 > for (let i = 0, len = source.length; i < len; i++) {
205 > const pair = source[i];
206 > if (!isCharacterPair(pair)) {
207 console.warn(`[${languageId}]: language configuration: expected \`brackets[${i}]\` to be an array of two strings.`);
208 continue;
209 }
211 > result = result || [];
212 > result.push(pair);
213 > }
214 > return result;
215 }
216
220 return undefined;
221 }
222 > if (!Array.isArray(source)) { languageConfigurationExtensionPoint.ts
223 console.warn(`[${languageId}]: language configuration: expected \`autoClosingPairs\` to be an array.`);
224 return undefined;
225 }
227 > let result: IAutoClosingPairConditional[] | undefined = undefined;
228 > for (let i = 0, len = source.length; i < len; i++) {
229 > const pair = source[i];
230 > if (Array.isArray(pair)) {
231 if (!isCharacterPair(pair)) {
232 console.warn(`[${languageId}]: language configuration: expected \`autoClosingPairs[${i}]\` to be an array of two strings or an object.`);
235 result = result || [];
236 result.push({ open: pair[0], close: pair[1] });
238 > if (!types.isObject(pair)) {
239 console.warn(`[${languageId}]: language configuration: expected \`autoClosingPairs[${i}]\` to be an array of two strings or an object.`);
240 continue;
241 }
242 > if (typeof pair.open !== 'string') { languageConfigurationExtensionPoint.ts
243 console.warn(`[${languageId}]: language configuration: expected \`autoClosingPairs[${i}].open\` to be a string.`);
244 continue;
245 }
246 > if (typeof pair.close !== 'string') { languageConfigurationExtensionPoint.ts
247 console.warn(`[${languageId}]: language configuration: expected \`autoClosingPairs[${i}].close\` to be a string.`);
248 continue;
249 }
250 > if (typeof pair.notIn !== 'undefined') { languageConfigurationExtensionPoint.ts
251 > if (!isStringArr(pair.notIn)) {
252 console.warn(`[${languageId}]: language configuration: expected \`autoClosingPairs[${i}].notIn\` to be a string array.`);
253 continue;
254 }
256 > result = result || [];
257 > result.push({ open: pair.open, close: pair.close, notIn: pair.notIn });
258 > }
259 > }
260 > return result;
261 }
262
266 return undefined;
267 }
268 > if (!Array.isArray(source)) { languageConfigurationExtensionPoint.ts
269 console.warn(`[${languageId}]: language configuration: expected \`surroundingPairs\` to be an array.`);
270 return undefined;
271 }
273 > let result: IAutoClosingPair[] | undefined = undefined;
274 > for (let i = 0, len = source.length; i < len; i++) {
275 > const pair = source[i];
276 > if (Array.isArray(pair)) {
277 > if (!isCharacterPair(pair)) {
278 console.warn(`[${languageId}]: language configuration: expected \`surroundingPairs[${i}]\` to be an array of two strings or an object.`);
279 continue;
280 }
281 > result = result || []; languageConfigurationExtensionPoint.ts
282 > result.push({ open: pair[0], close: pair[1] });
283 > } else {
284 if (!types.isObject(pair)) {
285 console.warn(`[${languageId}]: language configuration: expected \`surroundingPairs[${i}]\` to be an array of two strings or an object.`);
306 return undefined;
307 }
308 > if (!Array.isArray(source)) { languageConfigurationExtensionPoint.ts
309 console.warn(`[${languageId}]: language configuration: expected \`colorizedBracketPairs\` to be an array.`);
310 return undefined;
311 }
313 > const result: CharacterPair[] = [];
314 > for (let i = 0, len = source.length; i < len; i++) {
315 > const pair = source[i];
316 > if (!isCharacterPair(pair)) {
317 console.warn(`[${languageId}]: language configuration: expected \`colorizedBracketPairs[${i}]\` to be an array of two strings.`);
318 continue;
319 }
320 > result.push([pair[0], pair[1]]); languageConfigurationExtensionPoint.ts
321 >
322 > }
323 > return result;
324 }
325
329 return undefined;
330 }
331 > if (!Array.isArray(source)) { languageConfigurationExtensionPoint.ts
332 console.warn(`[${languageId}]: language configuration: expected \`onEnterRules\` to be an array.`);
333 return undefined;
334 }
336 > let result: OnEnterRule[] | undefined = undefined;
337 > for (let i = 0, len = source.length; i < len; i++) {
338 > const onEnterRule = source[i];
339 > if (!types.isObject(onEnterRule)) {
340 console.warn(`[${languageId}]: language configuration: expected \`onEnterRules[${i}]\` to be an object.`);
341 continue;
342 }
343 > if (!types.isObject(onEnterRule.action)) { languageConfigurationExtensionPoint.ts
344 console.warn(`[${languageId}]: language configuration: expected \`onEnterRules[${i}].action\` to be an object.`);
345 continue;
346 }
347 > let indentAction: IndentAction; languageConfigurationExtensionPoint.ts
348 > if (onEnterRule.action.indent === 'none') {
349 > indentAction = IndentAction.None;
350 > } else if (onEnterRule.action.indent === 'indent') {
351 > indentAction = IndentAction.Indent;
352 > } else if (onEnterRule.action.indent === 'indentOutdent') {
353 > indentAction = IndentAction.IndentOutdent;
354 > } else if (onEnterRule.action.indent === 'outdent') {
355 > indentAction = IndentAction.Outdent;
356 > } else {
357 console.warn(`[${languageId}]: language configuration: expected \`onEnterRules[${i}].action.indent\` to be 'none', 'indent', 'indentOutdent' or 'outdent'.`);
358 continue;
359 }
360 > const action: EnterAction = { indentAction }; languageConfigurationExtensionPoint.ts
361 > if (onEnterRule.action.appendText) {
362 > if (typeof onEnterRule.action.appendText === 'string') {
363 > action.appendText = onEnterRule.action.appendText;
364 > } else {
365 console.warn(`[${languageId}]: language configuration: expected \`onEnterRules[${i}].action.appendText\` to be undefined or a string.`);
366 }
368 > if (onEnterRule.action.removeText) {
369 > if (typeof onEnterRule.action.removeText === 'number') {
370 > action.removeText = onEnterRule.action.removeText;
371 > } else {
372 console.warn(`[${languageId}]: language configuration: expected \`onEnterRules[${i}].action.removeText\` to be undefined or a number.`);
373 }
375 > const beforeText = this._parseRegex(languageId, `onEnterRules[${i}].beforeText`, onEnterRule.beforeText);
376 > if (!beforeText) {
377 continue;
378 }
379 > const resultingOnEnterRule: OnEnterRule = { beforeText, action }; languageConfigurationExtensionPoint.ts
380 > if (onEnterRule.afterText) {
381 > const afterText = this._parseRegex(languageId, `onEnterRules[${i}].afterText`, onEnterRule.afterText);
382 > if (afterText) {
383 > resultingOnEnterRule.afterText = afterText;
384 > }
385 > }
386 > if (onEnterRule.previousLineText) {
387 > const previousLineText = this._parseRegex(languageId, `onEnterRules[${i}].previousLineText`, onEnterRule.previousLineText);
388 > if (previousLineText) {
389 > resultingOnEnterRule.previousLineText = previousLineText;
390 > }
391 > }
392 > result = result || [];
393 > result.push(resultingOnEnterRule);
394 > }
395 >
396 > return result;
397 }
398
443 private static _parseRegex(languageId: string, confPath: string, value: string | IRegExp): RegExp | undefined {
444 if (typeof value === 'string') {
446 > return new RegExp(value, '');
447 > } catch (err) {
448 console.warn(`[${languageId}]: Invalid regular expression in \`${confPath}\`: `, err);
449 return undefined;
450 }
452 if (types.isObject(value)) {
453 if (typeof value.pattern !== 'string') {
471
472 private static _mapIndentationRules(languageId: string, indentationRules: IIndentationRules): IndentationRule | undefined {
473 > const increaseIndentPattern = this._parseRegex(languageId, `indentationRules.increaseIndentPattern`, indentationRules.increaseIndentPattern); languageConfigurationExtensionPoint.ts
474 > if (!increaseIndentPattern) {
475 return undefined;
476 }
477 > const decreaseIndentPattern = this._parseRegex(languageId, `indentationRules.decreaseIndentPattern`, indentationRules.decreaseIndentPattern); languageConfigurationExtensionPoint.ts
478 > if (!decreaseIndentPattern) {
479 return undefined;
480 }
482 > const result: IndentationRule = {
483 > increaseIndentPattern: increaseIndentPattern,
484 > decreaseIndentPattern: decreaseIndentPattern
485 > };
486 >
487 > if (indentationRules.indentNextLinePattern) {
488 > result.indentNextLinePattern = this._parseRegex(languageId, `indentationRules.indentNextLinePattern`, indentationRules.indentNextLinePattern);
489 > }
490 > if (indentationRules.unIndentedLinePattern) {
491 > result.unIndentedLinePattern = this._parseRegex(languageId, `indentationRules.unIndentedLinePattern`, indentationRules.unIndentedLinePattern);
492 > }
493 >
494 > return result;
495 > }
496 }
497
src/vs/editor/common/languages/supports/indentationLineProcessor.ts 48 introduced LOC · 10 ranges

Open complete file

26
27 constructor(
28 > model: IVirtualModel, indentationLineProcessor.ts
29 > indentRulesSupport: IndentRulesSupport,
30 > languageConfigurationService: ILanguageConfigurationService
31 > ) {
32 > this._indentRulesSupport = indentRulesSupport;
33 > this._indentationLineProcessor = new IndentationLineProcessor(model, languageConfigurationService);
34 > }
35
36 /**
38 */
39 public shouldIncrease(lineNumber: number, newIndentation?: string): boolean {
40 > const processedLine = this._indentationLineProcessor.getProcessedLine(lineNumber, newIndentation); indentationLineProcessor.ts
41 > return this._indentRulesSupport.shouldIncrease(processedLine);
42 > }
43
44 /**
54 */
55 public shouldIgnore(lineNumber: number, newIndentation?: string): boolean {
56 > const processedLine = this._indentationLineProcessor.getProcessedLine(lineNumber, newIndentation); indentationLineProcessor.ts
57 > return this._indentRulesSupport.shouldIgnore(processedLine);
58 > }
59
60 /**
62 */
63 public shouldIndentNextLine(lineNumber: number, newIndentation?: string): boolean {
64 > const processedLine = this._indentationLineProcessor.getProcessedLine(lineNumber, newIndentation); indentationLineProcessor.ts
65 > return this._indentRulesSupport.shouldIndentNextLine(processedLine);
66 > }
67
68 }
173
174 constructor(
175 > private readonly model: IVirtualModel, indentationLineProcessor.ts
176 > private readonly languageConfigurationService: ILanguageConfigurationService
177 > ) { }
178
179 /**
182 */
183 getProcessedLine(lineNumber: number, newIndentation?: string): string {
184 > const replaceIndentation = (line: string, newIndentation: string): string => { indentationLineProcessor.ts
185 const currentIndentation = strings.getLeadingWhitespace(line);
186 const adjustedLine = newIndentation + line.substring(currentIndentation.length);
187 return adjustedLine;
188 };
190 > this.model.tokenization.forceTokenization?.(lineNumber);
191 > const tokens = this.model.tokenization.getLineTokens(lineNumber);
192 > let processedLine = this.getProcessedTokens(tokens).getLineContent();
193 > if (newIndentation !== undefined) {
194 processedLine = replaceIndentation(processedLine, newIndentation);
195 }
196 > return processedLine; indentationLineProcessor.ts
197 > }
198
199 /**
201 */
202 getProcessedTokens(tokens: IViewLineTokens): IViewLineTokens {
204 > const shouldRemoveBracketsFromTokenType = (tokenType: StandardTokenType): boolean => {
205 > return tokenType === StandardTokenType.String
206 > || tokenType === StandardTokenType.RegEx
207 > || tokenType === StandardTokenType.Comment;
208 > };
209 >
210 > const languageId = tokens.getLanguageId(0);
211 > const bracketsConfiguration = this.languageConfigurationService.getLanguageConfiguration(languageId).bracketsNew;
212 > const bracketsRegExp = bracketsConfiguration.getBracketRegExp({ global: true });
213 > const textAndMetadata: { text: string; metadata: number }[] = [];
214 > tokens.forEach((tokenIndex: number) => {
215 > const tokenType = tokens.getStandardTokenType(tokenIndex);
216 > let text = tokens.getTokenText(tokenIndex);
217 > if (shouldRemoveBracketsFromTokenType(tokenType)) {
218 text = text.replace(bracketsRegExp, '');
219 }
220 > const metadata = tokens.getMetadata(tokenIndex); indentationLineProcessor.ts
221 > textAndMetadata.push({ text, metadata });
222 > });
223 > const processedLineTokens = LineTokens.createFromTextAndMetadata(textAndMetadata, tokens.languageIdCodec);
224 > return processedLineTokens;
225 > }
226 }
227
src/vs/editor/contrib/indentation/common/indentation.ts 46 introduced LOC · 11 ranges

Open complete file

15
16 export function getReindentEditOperations(model: ITextModel, languageConfigurationService: ILanguageConfigurationService, startLineNumber: number, endLineNumber: number): ISingleEditOperation[] {
17 > if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) { indentation.ts
18 // Model is empty
19 return [];
20 }
22 > const indentationRulesSupport = languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).indentRulesSupport;
23 > if (!indentationRulesSupport) {
24 return [];
25 }
27 > const processedIndentRulesSupport = new ProcessedIndentRulesSupport(model, indentationRulesSupport, languageConfigurationService);
28 > endLineNumber = Math.min(endLineNumber, model.getLineCount());
29 >
30 > // Skip `unIndentedLinePattern` lines
31 > while (startLineNumber <= endLineNumber) {
32 > if (!processedIndentRulesSupport.shouldIgnore(startLineNumber)) {
33 > break;
34 > }
35
36 startLineNumber++;
37 }
39 > if (startLineNumber > endLineNumber - 1) {
40 return [];
41 }
43 > const { tabSize, indentSize, insertSpaces } = model.getOptions();
44 > const shiftIndent = (indentation: string, count?: number) => {
45 count = count || 1;
46 return ShiftCommand.shiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);
47 };
48 > const unshiftIndent = (indentation: string, count?: number) => { indentation.ts
49 count = count || 1;
50 return ShiftCommand.unshiftIndent(indentation, indentation.length + count, tabSize, indentSize, insertSpaces);
51 };
52 > const indentEdits: ISingleEditOperation[] = []; indentation.ts
53 >
54 > // indentation being passed to lines below
55 >
56 > // Calculate indentation for the first line
57 > // If there is no passed-in indentation, we use the indentation of the first line as base.
58 > const currentLineText = model.getLineContent(startLineNumber);
59 > let globalIndent = strings.getLeadingWhitespace(currentLineText);
60 > // idealIndentForNextLine doesn't equal globalIndent when there is a line matching `indentNextLinePattern`.
61 > let idealIndentForNextLine: string = globalIndent;
62 >
63 > if (processedIndentRulesSupport.shouldIncrease(startLineNumber)) {
64 idealIndentForNextLine = shiftIndent(idealIndentForNextLine);
65 globalIndent = shiftIndent(globalIndent);
68 idealIndentForNextLine = shiftIndent(idealIndentForNextLine);
69 }
71 > startLineNumber++;
72 >
73 > // Calculate indentation adjustment for all following lines
74 > for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {
75 > if (doesLineStartWithString(model, lineNumber)) {
76 continue;
77 }
102 idealIndentForNextLine = globalIndent;
103 }
104 > } indentation.ts
105 >
106 > return indentEdits;
107 > }
108
109 > function doesLineStartWithString(model: ITextModel, lineNumber: number): boolean { indentation.ts
110 > if (!model.tokenization.isCheapToTokenize(lineNumber)) {
111 return false;
112 }
113 > const lineTokens = model.tokenization.getLineTokens(lineNumber); indentation.ts
114 > return lineTokens.getStandardTokenType(0) === StandardTokenType.String;
115 > }
src/vs/editor/common/languages/supports/indentRules.ts 24 introduced LOC · 9 ranges

Open complete file

13 }
14
15 > function resetGlobalRegex(reg: RegExp) { indentRules.ts
16 > if (reg.global) {
17 reg.lastIndex = 0;
18 }
20 > return true;
21 > }
22
23 export class IndentRulesSupport {
26
27 constructor(indentationRules: IndentationRule) {
28 > this._indentationRules = indentationRules; indentRules.ts
29 > }
30
31 public shouldIncrease(text: string): boolean {
32 > if (this._indentationRules) { indentRules.ts
33 > if (this._indentationRules.increaseIndentPattern && resetGlobalRegex(this._indentationRules.increaseIndentPattern) && this._indentationRules.increaseIndentPattern.test(text)) {
34 return true;
35 }
36 > // if (this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(text)) { indentRules.ts
37 > // return true;
38 > // }
39 > }
40 > return false;
41 > }
42
43 public shouldDecrease(text: string): boolean {
49
50 public shouldIndentNextLine(text: string): boolean {
51 > if (this._indentationRules && this._indentationRules.indentNextLinePattern && resetGlobalRegex(this._indentationRules.indentNextLinePattern) && this._indentationRules.indentNextLinePattern.test(text)) { indentRules.ts
52 return true;
53 }
55 > return false;
56 > }
57
58 public shouldIgnore(text: string): boolean {
59 > // the text matches `unIndentedLinePattern` indentRules.ts
60 > if (this._indentationRules && this._indentationRules.unIndentedLinePattern && resetGlobalRegex(this._indentationRules.unIndentedLinePattern) && this._indentationRules.unIndentedLinePattern.test(text)) {
61 return true;
62 }
64 > return false;
65 > }
66
67 public getIndentMetadata(text: string): number {
src/vs/editor/common/tokens/lineTokens.ts 20 introduced LOC · 3 ranges

Open complete file

42
43 public static createFromTextAndMetadata(data: { text: string; metadata: number }[], decoder: ILanguageIdCodec): LineTokens {
44 > let offset: number = 0; lineTokens.ts
45 > let fullText: string = '';
46 > const tokens = new Array<number>();
47 > for (const { text, metadata } of data) {
48 > tokens.push(offset + text.length, metadata);
49 > offset += text.length;
50 > fullText += text;
51 > }
52 > return new LineTokens(new Uint32Array(tokens), fullText, decoder);
53 > }
54
55 public static convertToEndOffset(tokens: Uint32Array, lineTextLength: number): void {
281
282 public getTokenText(tokenIndex: number): string {
283 > const startOffset = this.getStartOffset(tokenIndex); lineTokens.ts
284 > const endOffset = this.getEndOffset(tokenIndex);
285 > const text = this._text.substring(startOffset, endOffset);
286 > return text;
287 > }
288
289 public forEach(callback: (tokenIndex: number) => void): void {
290 > const tokenCount = this.getCount(); lineTokens.ts
291 > for (let tokenIndex = 0; tokenIndex < tokenCount; tokenIndex++) {
292 > callback(tokenIndex);
293 > }
294 > }
295
296 toString(): string {
src/vs/editor/common/languages/languageConfigurationRegistry.ts 10 introduced LOC · 3 ranges

Open complete file

279 public static cmp(a: LanguageConfigurationContribution, b: LanguageConfigurationContribution) {
280 if (a.priority === b.priority) {
281 > // higher order last languageConfigurationRegistry.ts
282 > return a.order - b.order;
283 > }
284 // higher priority last
285 return a.priority - b.priority;
380 this.indentationRules = this.underlyingConfig.indentationRules;
381 if (this.underlyingConfig.indentationRules) {
382 > this.indentRulesSupport = new IndentRulesSupport( languageConfigurationRegistry.ts
383 > this.underlyingConfig.indentationRules
384 > );
385 } else {
386 this.indentRulesSupport = null;
466 }
467 if (commentRule.blockComment) {
468 > const [blockStart, blockEnd] = commentRule.blockComment; languageConfigurationRegistry.ts
469 > comments.blockCommentStartToken = blockStart;
470 > comments.blockCommentEndToken = blockEnd;
471 > }
472
473 return comments;
src/vs/editor/common/languages/supports/languageBracketsConfiguration.ts 3 introduced LOC · 1 range

Open complete file

96
97 public getBracketRegExp(options?: RegExpOptions): RegExp {
98 > const brackets = Array.from([...this._openingBrackets.keys(), ...this._closingBrackets.keys()]); languageBracketsConfiguration.ts
99 > return createBracketOrRegExp(brackets, options);
100 > }
101 }
102
src/vs/editor/common/model/tokens/tokenizationTextModelPart.ts 3 introduced LOC · 1 range

Open complete file

202
203 public isCheapToTokenize(lineNumber: number): boolean {
204 > this.validateLineNumber(lineNumber); tokenizationTextModelPart.ts
205 > return this.tokens.get().isCheapToTokenize(lineNumber);
206 > }
207
208 public tokenizeIfCheap(lineNumber: number): void {
src/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.ts 2 introduced LOC · 2 ranges

Open complete file

271
272 public isCheapToTokenize(lineNumber: number): boolean {
273 > if (!this._tokenizer) { tokenizerSyntaxTokenBackend.ts
274 return true;
275 }
276 return this._tokenizer.isCheapToTokenize(lineNumber);
278
279 public getLineTokens(lineNumber: number): LineTokens {