Elektrine lite

← Feed

@AndrasKovacs@mathstodon.xyz

2026-09-29 11:00 UTC

I investigated resilient parsing (meaning that we want to parse as much of the source as possible and produce multiple errors) and arrived at the following thing: https://andraskovacs.github.io/posts/2026/09/resilient-parsing/ I'm quite happy with this iteration. The most interesting thing I learned is probably the following: every parsing error should have *three* positions. The position where the parser actually failed, and a span around it which indicates the *error node* being produced in the AST. These error nodes are carried further into elaboration and behave the same way as error nodes produced from elaboration errors, i.e. we can report multiple parsing and elaboration errors at the same time.

Replies (0)

No replies.