@@ -18,7 +18,7 @@ import {
1818 openLowCodeEditors ,
1919 compileErrorMsg ,
2020} from "../../utils" ;
21- import { FILESYSTEM_READONLY_SCHEMA , FILESYSTEM_SCHEMA , intLangId , macLangId } from "../../extension" ;
21+ import { FILESYSTEM_READONLY_SCHEMA , FILESYSTEM_SCHEMA } from "../../extension" ;
2222import { addIsfsFileToProject , modifyProject } from "../../commands/project" ;
2323import { DocumentContentProvider } from "../DocumentContentProvider" ;
2424import { Document , UserAction } from "../../api/atelier" ;
@@ -124,18 +124,11 @@ export function generateFileContent(
124124 sourceLines . shift ( ) ;
125125 const routineName = fileName . split ( "." ) . slice ( 0 , - 1 ) . join ( "." ) ;
126126 const routineType = fileExt != "mac" ? `[Type=${ fileExt . toUpperCase ( ) } ]` : "" ;
127- if ( sourceLines . length === 0 && fileExt !== "inc" ) {
128- const languageId = fileExt === "mac" ? macLangId : intLangId ;
129-
130- // Labels cannot contain dots
131- const firstLabel = routineName . replaceAll ( "." , "" ) ;
132-
133- // Be smart about whether to use a Tab or a space between label and comment.
134- // Doing this will help autodetect to do the right thing.
135- const lineStart = vscode . workspace . getConfiguration ( "editor" , { languageId, uri } ) . get ( "insertSpaces" )
136- ? " "
137- : "\t" ;
138- sourceLines . push ( `${ firstLabel } ${ lineStart } ;` ) ;
127+ if ( ! sourceLines . length ) {
128+ // Add a macro comment line
129+ if ( fileExt != "int" ) sourceLines . push ( "#;" ) ;
130+ // Add a trailing newline
131+ sourceLines . push ( "" ) ;
139132 }
140133 return {
141134 content : [ `ROUTINE ${ routineName } ${ routineType } ` , ...sourceLines ] ,
0 commit comments