MCPcopy Create free account
hub / github.com/REditorSupport/vscode-R / addLineToCache

Method addLineToCache

src/lineCache.ts:18–24  ·  view source on GitHub ↗
(line: number)

Source from the content-addressed store, hash-verified

16 }
17 // Returns [Line, EndsInOperator]
18 public addLineToCache(line: number): [string, boolean] {
19 const cleaned = cleanLine(this.getLine(line));
20 const endsInOperator = doesLineEndInOperator(cleaned);
21 this.lineCache.set(line, cleaned);
22 this.endsInOperatorCache.set(line, endsInOperator);
23 return [cleaned, endsInOperator];
24 }
25 public getEndsInOperatorFromCache(line: number): boolean {
26 const lineInCache = this.endsInOperatorCache.get(line);
27 if (lineInCache === undefined) {

Callers 2

getLineFromCacheMethod · 0.95

Calls 2

cleanLineFunction · 0.85
doesLineEndInOperatorFunction · 0.85

Tested by

no test coverage detected