vshaxe / hxparser

OCaml/menhir implementation of a new Haxe parser.
MIT License
16 stars 2 forks source link

Distinguish recovering/compilation mode #8

Open Simn opened 7 years ago

Simn commented 7 years ago

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.

nadako commented 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?

Simn commented 7 years ago

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