Skip to content

Commit 34021e1

Browse files
authored
Merge pull request #54 from AntonYartsev/master
add csp compile support
2 parents 018cd22 + 54b0d0a commit 34021e1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/utils/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs = require("fs");
22
import path = require("path");
33
import * as vscode from "vscode";
4-
import { schemas, workspaceState } from "../extension";
4+
import { config, schemas, workspaceState } from "../extension";
55

66
export const outputChannel = vscode.window.createOutputChannel("ObjectScript");
77

@@ -36,7 +36,12 @@ export function currentFile(document?: vscode.TextDocument): CurrentFile {
3636
name = match[1];
3737
ext = "cls";
3838
}
39-
} else {
39+
}
40+
else if (fileExt === "csp") {
41+
name = config().conn.label.toLowerCase()+fileName.split(config().conn.label.toLowerCase())[1].replace(/\\/g,"/").replace(".csp","")
42+
ext = "csp"
43+
}
44+
else {
4045
const match = content.match(/^ROUTINE ([^\s]+)(?:\s+\[.*Type=([a-z]{3,}))?/i);
4146
name = match[1];
4247
ext = match[2] || "mac";

0 commit comments

Comments
 (0)