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 11import fs = require( "fs" ) ;
22import path = require( "path" ) ;
33import * as vscode from "vscode" ;
4- import { schemas , workspaceState } from "../extension" ;
4+ import { config , schemas , workspaceState } from "../extension" ;
55
66export 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 ( / ^ R O U T I N E ( [ ^ \s ] + ) (?: \s + \[ .* T y p e = ( [ a - z ] { 3 , } ) ) ? / i) ;
4146 name = match [ 1 ] ;
4247 ext = match [ 2 ] || "mac" ;
You can’t perform that action at this time.
0 commit comments