about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_function_body.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_function_body.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_function_body.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_function_body.txt b/js/scripting-lang/scratch_tests/test_function_body.txt
new file mode 100644
index 0000000..7af35e5
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_function_body.txt
@@ -0,0 +1,15 @@
+/* Test multiple statements in function bodies */
+
+/* Test simple function */
+simple_func : n -> n;
+
+/* Test function with multiple statements */
+multi_func : n ->
+  a : n + 1;
+  b : a * 2;
+  b;
+
+result1 : simple_func 5;
+result2 : multi_func 5;
+..out result1;
+..out result2; 
\ No newline at end of file