Closed rkaminsk closed 1 year ago
The second variant produces an error message. However, the parse result has a value.
Yes, this is due to error recovery - when dsl::eof
fails, it automatically recovers and continues parsing. If you want to know whether scanning issued any diagnostics, call .finish()
and inspect the lexy::validate_result
.
The third variant leads to an assertion. It seems like the lexy::error_context class does not have the right position.
That's a bug, I'll investigate.
Fixed.
I was experimenting with scanners and noticed some strange behavior indicated below.
lexy::error_context
class does not have the right position.