diff --git a/README.md b/README.md index 117f173..c5adaaa 100644 --- a/README.md +++ b/README.md @@ -14,19 +14,23 @@ A simple language server based VSCode Extension for the (Branflakes?) (BrainFuck ### Execution Use the BF execute task to execute the code. -Because JS is single threaded+. -If the program requires input, it will be requested as a prompt. +Either run the "current file" task, or create a customized task with the required file. +I/O is done on the created terminal window. -TODO: Implement a timeout. + +There is also an older command to run the code, where output is shown as a status message. Here, if the program requires input, it will be requested as a prompt. ### Changelog #### 0.3.0 +![command](./assets/command.gif) + - Added a task for execution - Press Control C to halt it while its waiting for input - Close task to abort execution - + - Detail: The program will halt between loop iterations. +- Migrated the run command to `bf.execute.old` #### 0.2.1 diff --git a/assets/command.gif b/assets/command.gif new file mode 100644 index 0000000..61de27a Binary files /dev/null and b/assets/command.gif differ diff --git a/client/src/task/CustomExecutionTerminal.ts b/client/src/task/CustomExecutionTerminal.ts index fc54cac..47e9a3c 100644 --- a/client/src/task/CustomExecutionTerminal.ts +++ b/client/src/task/CustomExecutionTerminal.ts @@ -71,6 +71,7 @@ class CustomBuildTaskTerminal implements vscode.Pseudoterminal { const newData = [...data].map(e => e.charCodeAt(0)); console.log('new input', newData); this.inputQueue.push(...newData); + this.writeEmitter.fire(replaceLFWithCRLF(data)); this.readEmitter.fire(); } @@ -112,7 +113,7 @@ class CustomBuildTaskTerminal implements vscode.Pseudoterminal { } private async doExecution(): Promise { - this.writeEmitter.fire('[bf] Requested execution of ' + this.fileName + '\r\n'); + this.writeEmitter.fire('[bf] Requested execution of ' + (this.fileName ?? 'active file') + '\r\n'); const cus = this; try { diff --git a/package-lock.json b/package-lock.json index cf85ac1..4334c13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bfc-server", - "version": "0.3.0", + "version": "0.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bfc-server", - "version": "0.3.0", + "version": "0.3.1", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 9c49fb1..ee6c44c 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "Atreya Bain", "license": "MIT", "publisher": "atreyabain", - "version": "0.3.0", + "version": "0.3.1", "icon": "assets/128.png", "categories": ["Programming Languages","Linters"], "keywords": [