'as' pattern

This commit is contained in:
Dmitry Boulytchev 2018-11-05 18:21:41 +03:00
parent be89ee983a
commit 8a4874797b
8 changed files with 89 additions and 31 deletions

21
regression/test046.expr Normal file
View file

@ -0,0 +1,21 @@
n := read ();
case 3 of
a -> write (a)
| _ -> write (0)
esac;
case 3 of
a -> write (a)
esac;
case 3 of
a@_ -> write (a)
esac;
case `a (1, 2, 3) of
`b -> write (1)
| a@`a (_, _, _) -> case a of
`a (x, y, z) -> write (x); write (y); write (z)
esac
esac