File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
import fs = require( "fs" ) ;
2
2
import path = require( "path" ) ;
3
3
import * as vscode from "vscode" ;
4
- import { schemas , workspaceState } from "../extension" ;
4
+ import { config , schemas , workspaceState } from "../extension" ;
5
5
6
6
export const outputChannel = vscode . window . createOutputChannel ( "ObjectScript" ) ;
7
7
@@ -36,7 +36,12 @@ export function currentFile(document?: vscode.TextDocument): CurrentFile {
36
36
name = match [ 1 ] ;
37
37
ext = "cls" ;
38
38
}
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 {
40
45
const match = content . match ( / ^ R O U T I N E ( [ ^ \s ] + ) (?: \s + \[ .* T y p e = ( [ a - z ] { 3 , } ) ) ? / i) ;
41
46
name = match [ 1 ] ;
42
47
ext = match [ 2 ] || "mac" ;
You can’t perform that action at this time.
0 commit comments