mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-28 01:28:48 +00:00
Pattern matching in X86
This commit is contained in:
parent
9f8391607d
commit
bbe403de26
18 changed files with 179 additions and 3 deletions
11
regression/test041.expr
Normal file
11
regression/test041.expr
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fun f (a) {
|
||||
case a of
|
||||
`a (x, y, z) -> write (x + y + z)
|
||||
| `b (x, y, z) -> write (x + y + z)
|
||||
esac
|
||||
}
|
||||
|
||||
x := read ();
|
||||
|
||||
f (`a (100, 200, 300));
|
||||
f (`b (500, 600, 700))
|
||||
Loading…
Add table
Add a link
Reference in a new issue