mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
Pattern matching in X86
This commit is contained in:
parent
1f1ef2ce57
commit
57588f2605
18 changed files with 179 additions and 3 deletions
15
regression/test040.expr
Normal file
15
regression/test040.expr
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
fun f (x) {
|
||||
case x of
|
||||
`a -> write (1)
|
||||
| `b -> write (2)
|
||||
| `c -> write (3)
|
||||
| _ -> write (4)
|
||||
esac
|
||||
}
|
||||
|
||||
x := read ();
|
||||
|
||||
f (`a);
|
||||
f (`b);
|
||||
f (`c);
|
||||
f (`d)
|
||||
Loading…
Add table
Add a link
Reference in a new issue