Open Simn opened 7 years ago
Could this be done by passing some report_error
function to the parser that either collects them as diagnostics for display or throws an exception eagerly for real compilation?
I'm not sure. We do that in Haxe for errors and it has gotten a bit messy.
The parser is currently very permissive by default. It inserts various missing tokens and skips invalid ones. This is nice for display support, but if we want to make it the official parser at some point, we will have to emit errors properly.