implements inner function definition in function body

This commit is contained in:
Alexander Acker 2024-10-08 14:12:31 +02:00
parent 2fefd8c04f
commit 78bb3321d8
2 changed files with 44 additions and 38 deletions

View file

@ -1,9 +1,11 @@
add: int a int b -> int
| 1 -> a b +
;
ad: int a int b -> int
| 1 -> a b +
test: int a -> int
| a 1 == -> inner: int b -> int
| b 0 == -> 5 fuenf
| 1 1 == -> 7 sieben
;
a inner
| 1 1 == -> 3 drei
;
fuenf: int a -> int
@ -14,12 +16,9 @@ drei: int a -> int
| 1 -> a
;
test: int a -> int
| fb: int b -> int
| 1 b == -> 0 0 add
| 1 1 == -> 1 0 ad
;
a fb -> 1 drei
| 1 1 == -> 3 fb
sieben: int a -> int
| 1 -> a
;
0 test