diff --git a/wacc-syntax/extension.js b/wacc-syntax/extension.js index c2fd39c..35638c7 100644 --- a/wacc-syntax/extension.js +++ b/wacc-syntax/extension.js @@ -34,6 +34,7 @@ function deactivate() { function generateErrors(code) { try { + console.log("generating errors") const fs = require('fs'); const tmpFilePath = '/tmp/temp_wacc_file.wacc'; fs.writeFileSync(tmpFilePath, code); @@ -41,8 +42,11 @@ function generateErrors(code) { let output; try { // 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) { + console.log("this aint working buddy") + console.log(err) output = err.stdout; } let errors = []; diff --git a/wacc-syntax/wacc_exe b/wacc-syntax/wacc_exe new file mode 100755 index 0000000..215fbde Binary files /dev/null and b/wacc-syntax/wacc_exe differ