aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2024-06-20 14:30:59 +0200
committerBad Diode <bd@badd10de.dev>2024-06-20 14:41:10 +0200
commitd8bdb8be74904ee7b12d3f61dc3afe222aec82ff (patch)
treeb496399cae78397d0ec2696654b86b44cf7232a3 /tests
parenteca9cb305b08e0e292d01008797b9300d47f72d5 (diff)
downloadbdl-d8bdb8be74904ee7b12d3f61dc3afe222aec82ff.tar.gz
bdl-d8bdb8be74904ee7b12d3f61dc3afe222aec82ff.zip
Add parsing of funcalls
Diffstat (limited to 'tests')
-rw-r--r--tests/functions.bad4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/functions.bad b/tests/functions.bad
index 0d2e2d0..fa28d75 100644
--- a/tests/functions.bad
+++ b/tests/functions.bad
@@ -3,7 +3,7 @@ fun add_two(a: int, b: int): int a + b
3 3
4; Functions return the result of the last expression implicitly. 4; Functions return the result of the last expression implicitly.
5fun add_three(a: int, b: int, c: int): int { 5fun add_three(a: int, b: int, c: int): int {
6 a + b + c 6 add_two(a, b) + c
7} 7}
8 8
9; Functions that don't return anything must explicitly state it as returning 9; Functions that don't return anything must explicitly state it as returning
@@ -14,7 +14,7 @@ fun foo(): nil {
14 14
15; An alternate form for empty return values. 15; An alternate form for empty return values.
16fun bar(): () { 16fun bar(): () {
17 write("hello world") 17 foo()
18} 18}
19 19
20; We support multiple return values, in this case the "return" keyword must be 20; We support multiple return values, in this case the "return" keyword must be