mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-26 16:48:46 +00:00
Added test for expr + stmt
This commit is contained in:
parent
2aa460a25a
commit
7bf40bf26f
4 changed files with 41 additions and 0 deletions
26
regression/test054.expr
Normal file
26
regression/test054.expr
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
x := y := z := 105;
|
||||
|
||||
n := read ();
|
||||
|
||||
write (x);
|
||||
write (y);
|
||||
write (z);
|
||||
|
||||
if z then x else y fi := 230;
|
||||
|
||||
write (x);
|
||||
write (y);
|
||||
write (z);
|
||||
|
||||
(write (z); z) := 250;
|
||||
|
||||
write (x);
|
||||
write (y);
|
||||
write (z);
|
||||
|
||||
s := [1, 2, 3, 4];
|
||||
i := -1;
|
||||
|
||||
while n := s[i := i + 1]; n == 1 !! n == 2 !! n == 3 do
|
||||
write (n)
|
||||
od
|
||||
Loading…
Add table
Add a link
Reference in a new issue