[fine] Some resilience, a design improvement for iterator

This commit is contained in:
John Doty 2024-01-29 10:04:47 -08:00
parent 15548afc38
commit f2e82942df
4 changed files with 29 additions and 8 deletions

View file

@ -11,8 +11,12 @@ fun test() {
// We need to make sure things are parsed correctly.
//
// TODO: Better parser recovery will improve the specifics of the errors.
//
// TODO: This is parsed wrong; the `{` is consumed after the '.' and it
// should instead be ignored. This is the "greedy" expression parsing that
// matklad talks about in his resilient parser article.
//
// @expect-errors:
// | 7:12: Error at '{': expected an expression
// | 7:13: Error at 'let': expect ';' to end a let statement
// | 7:26: cannot find value foo here
// | 8:0: Error at '}': unbalanced '}'