Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript language give incorrect line number for syntax errors #205

Open
desean1625 opened this issue Sep 21, 2023 · 0 comments
Open

Javascript language give incorrect line number for syntax errors #205

desean1625 opened this issue Sep 21, 2023 · 0 comments

Comments

@desean1625
Copy link

The following code give the line number of the runner, not the program.

const TEST = {
broken:()=>{,
}

You can get the correct line number by running the program in a webworker like this.

let blob = new Blob([program])
let url = URL.createObjectURL(blob)
w = new Worker(url)
w.onerror = (e)=>{
  this.microvm.context.location = {
    token: {
      line: e.lineNumber,
      column: e.columnNumber
    }
  };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant