Added tests; weird & ugly workaround in the parser

This commit is contained in:
Dmitry Boulytchev 2019-09-22 22:25:05 +03:00
parent d69cb3d49d
commit 39388d77fd
13 changed files with 108 additions and 10 deletions

17
regression/test060.expr Normal file
View file

@ -0,0 +1,17 @@
fun f (l) {
infix "===" at "==" (a, b) {
return a == b
}
case l of
{} -> return 1
| {_} -> return 1
| a : b : tl -> return a === b && f (b : tl)
esac
}
write (f ({}));
write (f ({1}));
write (f ({1, 1}));
write (f ({1, 1, 1}));
write (f ({1, 2, 1}))