intelliwacc ide #43

Merged
gc1523 merged 9 commits from intelliwacc-ide into master 2025-03-14 13:22:53 +00:00
44 changed files with 808 additions and 1152 deletions
Showing only changes of commit 36ddd025b2 - Show all commits

View File

@@ -34,6 +34,7 @@ function deactivate() {
function generateErrors(code) { function generateErrors(code) {
try { try {
console.log("generating errors")
const fs = require('fs'); const fs = require('fs');
const tmpFilePath = '/tmp/temp_wacc_file.wacc'; const tmpFilePath = '/tmp/temp_wacc_file.wacc';
fs.writeFileSync(tmpFilePath, code); fs.writeFileSync(tmpFilePath, code);
@@ -41,8 +42,11 @@ function generateErrors(code) {
let output; let output;
try { try {
// currently only works if the wacc compiler exe is in the parent directory // currently only works if the wacc compiler exe is in the parent directory
output = execSync(`../wacc_exe ${tmpFilePath}`, { encoding: 'utf8', stdio: 'pipe' }); const waccExePath = `${__dirname}/wacc_exe`;
output = execSync(`${waccExePath} ${tmpFilePath}`, { encoding: 'utf8', stdio: 'pipe' });
} catch (err) { } catch (err) {
console.log("this aint working buddy")
console.log(err)
output = err.stdout; output = err.stdout;
} }
let errors = []; let errors = [];

BIN
wacc-syntax/wacc_exe Executable file

Binary file not shown.