Skip to content

Commit c64332b

Browse files
ty-ddaimor
andauthored
Apply suggestions from code review
Co-authored-by: Dmitry Maslennikov <[email protected]>
1 parent c725c79 commit c64332b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/explorer/models/rootNode.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ export class RootNode extends NodeBase {
115115
})
116116
.map((el) => {
117117
switch (el.Type) {
118+
case "5":
118119
case "9":
120+
case "100":
119121
return new PackageNode(el.Name, el.fullName, category, this.options);
120122
case "4":
121123
return new ClassNode(el.Name, el.fullName, this.options);
@@ -125,12 +127,8 @@ export class RootNode extends NodeBase {
125127
case "3":
126128
case "11":
127129
return new RoutineNode(el.Name, el.fullName, this.options);
128-
case "100":
129-
return new ClassNode(el.Name, el.fullName, this.options);
130130
case "10":
131131
return new RootNode(el.Name, el.fullName, "dataNode:CSPApplication", this._category, this.options, true);
132-
case "5":
133-
return new ClassNode(el.Name, el.fullName, this.options);
134132
default:
135133
return null;
136134
}

src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function currentFile(document?: vscode.TextDocument): CurrentFile {
5353
if (match) {
5454
[, name, ext = "cls"] = match;
5555
}
56-
} else if (fileExt === "mac" || fileExt === "int" || fileExt === "inc") {
56+
} else if (fileExt.match(/(mac|int|inc)/i)) {
5757
const match = content.match(/^ROUTINE ([^\s]+)(?:\s*\[\s*Type\s*=\s*\b([a-z]{3})\b)?/i);
5858
if (match) {
5959
[, name, ext = "mac"] = match;

0 commit comments

Comments
 (0)