Minor changes and fixes to add-new-language script
This commit is contained in:
parent
4fc94fd9ab
commit
5b5600f329
@ -76,8 +76,8 @@ const copyFile = (src, dest) => {
|
||||
const dest = path.resolve(__dirname, `../pages/ide/${langId}.tsx`);
|
||||
const contents = cropFirstLine(fs.readFileSync(src).toString());
|
||||
const finalContents = contents
|
||||
.replace("$LANG_ID", langId)
|
||||
.replace("$LANG_NAME", langName);
|
||||
.replace(/\$LANG_ID/g, langId)
|
||||
.replace(/\$LANG_NAME/g, langName);
|
||||
fs.writeFileSync(dest, finalContents);
|
||||
}
|
||||
|
||||
|
@ -7,11 +7,9 @@ export type RS = {
|
||||
};
|
||||
|
||||
/** Sample program */
|
||||
export const sampleProgram = [
|
||||
"Program line 1",
|
||||
"Program line 2",
|
||||
"Program line 3",
|
||||
].join("\n");
|
||||
export const sampleProgram = `Program line 1
|
||||
Program line 2
|
||||
Program line 3`;
|
||||
|
||||
/** Syntax highlighting */
|
||||
export const editorTokensProvider: MonacoTokensProvider = {
|
||||
|
@ -17,6 +17,6 @@ export default class XYZLanguageEngine implements LanguageEngine<RS> {
|
||||
|
||||
executeStep(): StepExecutionResult<RS> {
|
||||
// TODO: Unimplemented
|
||||
return { rendererState: { value: 0 }, nextStepLocation: { line: 0 } };
|
||||
return { rendererState: { value: 0 }, nextStepLocation: { startLine: 0 } };
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user