diff options
author | Bad Diode <bd@badd10de.dev> | 2024-06-20 14:30:59 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2024-06-20 14:41:10 +0200 |
commit | d8bdb8be74904ee7b12d3f61dc3afe222aec82ff (patch) | |
tree | b496399cae78397d0ec2696654b86b44cf7232a3 /tests | |
parent | eca9cb305b08e0e292d01008797b9300d47f72d5 (diff) | |
download | bdl-d8bdb8be74904ee7b12d3f61dc3afe222aec82ff.tar.gz bdl-d8bdb8be74904ee7b12d3f61dc3afe222aec82ff.zip |
Add parsing of funcalls
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functions.bad | 4 |
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. |
5 | fun add_three(a: int, b: int, c: int): int { | 5 | fun 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. |
16 | fun bar(): () { | 16 | fun 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 |