You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 19, 2018. It is now read-only.
Right now whenever Babylon comes across a syntax error it immediately throws an error and tosses out the AST. While this is okay for a compiler pipeline where we want don't want to attempt transforming a broken AST, it's not okay for other types of tooling.
For example, there's plenty of tooling that needs to run in your editor while you are typing. If you are in the middle of typing code, you often have a half-finished/invalid program. But this is when editor tooling is most useful because a lot of it's there to help finish what you're typing.
I think the best way to approach this would be to start by removing all the throw-s from the parser code and replace them by pushing to an errors array. Then we can start to identify all the places where we'll have to make a decision on how to continue building the AST.