hxparser icon indicating copy to clipboard operation
hxparser copied to clipboard

Distinguish recovering/compilation mode

Open Simn opened this issue 9 years ago • 2 comments

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.

Simn avatar Feb 21 '17 12:02 Simn

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?

nadako avatar Feb 21 '17 12:02 nadako

I'm not sure. We do that in Haxe for errors and it has gotten a bit messy.

Simn avatar Feb 21 '17 12:02 Simn