mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-31 19:18:18 +00:00
Added tests; weird & ugly workaround in the parser
This commit is contained in:
parent
d69cb3d49d
commit
39388d77fd
13 changed files with 108 additions and 10 deletions
17
regression/test060.expr
Normal file
17
regression/test060.expr
Normal 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}))
|
||||
Loading…
Add table
Add a link
Reference in a new issue