Skip to content

Commit 17b2e22

Browse files
Asttearxsro
authored andcommitted
fix code format
1 parent 31bda64 commit 17b2e22

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/language/scanDoc.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ import * as vscode from 'vscode';
22
import { getType, KeywordType } from './wordinfo';
33

44
export class DocInfo {
5-
static docScaned: vscode.TextDocument | undefined = undefined;
6-
static docInfoScaned: DocInfo | undefined = undefined;
5+
static docScannedVersion: number | undefined = undefined;
6+
static docScannedFileName: string | undefined = undefined;
7+
static docInfoScanned: DocInfo | undefined = undefined;
78
static getDocInfo(doc: vscode.TextDocument): DocInfo {
8-
if (DocInfo.docInfoScaned && DocInfo.docScaned?.version === doc.version && DocInfo.docScaned.fileName === doc.fileName) {
9+
if (DocInfo.docInfoScanned && this.docScannedVersion === doc.version && this.docScannedFileName === doc.fileName) {
910
} else {
10-
DocInfo.docInfoScaned = new DocInfo(doc);
11-
DocInfo.docScaned = doc;
11+
DocInfo.docInfoScanned = new DocInfo(doc);
12+
this.docScannedFileName = doc.fileName;
13+
this.docScannedVersion = doc.version;
1214
}
13-
return DocInfo.docInfoScaned;
15+
return DocInfo.docInfoScanned;
1416
}
1517

1618
lines: Asmline[];

0 commit comments

Comments
 (0)