-
Notifications
You must be signed in to change notification settings - Fork 8
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
BUG: breakpoint causes valid code to have a syntax error #111
Comments
Yeah, that makes sense why it doesn't work. I wonder if there is any way we could inject the stop statement safely in that situation? Like, would something like:
Probably not though. We don't currently have any validation for where breakpoints are placed. However, we definitely should. Maybe parse the file with the brighterscript compiler and inspect the line to ensure it's going to be placing the breakpoint at a valid location? |
Can't think of any other way tbh |
We should honestly do what Ts does and move it to the next valid stopable line. Like @iBicha says we might be able to do something where we use brighter script to parse and find that next valid location. |
Actually it's not a lot of effort for the dev to move the breakpoint themselves. The problem is not knowing why it is failing. So if detection is easier than prevention, it's definitely a good path with just a good error message |
@iBicha i think that what I was getting at is that detecting it is almost as much as moving it for them since we need to understand all invalid locations. But yea an error would help as well. |
If you put a breakpoint on an object assign which spans multiple lines
It will show a syntax error (without much explanation)
The transpiled BRS shows
Which is not valid BRS
The text was updated successfully, but these errors were encountered: