summaryrefslogtreecommitdiff
path: root/test/asset/parser/function.et
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-05-01 10:02:50 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2026-05-01 10:54:24 +0200
commit62b65e16f5ef4e59dcfbdc10ae2b3cd419d79d7a (patch)
treeae2a4a47c259e94133213fa5ba56c4fb0b67f7df /test/asset/parser/function.et
parenta84c4722a3774bb64e3e3616c16264d09c991378 (diff)
Parsing distinction for single-word and function-call terms
Diffstat (limited to 'test/asset/parser/function.et')
-rw-r--r--test/asset/parser/function.et10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/asset/parser/function.et b/test/asset/parser/function.et
new file mode 100644
index 0000000..3eca414
--- /dev/null
+++ b/test/asset/parser/function.et
@@ -0,0 +1,10 @@
+def f (x) and y = (x + y) + 1
+
+def g (x) and y = (x + (y+1))
+
+test Test:
+ guard (1 == 1)
+ guard (f 1 and 2 == 4)
+ guard (f 1 and 2 == g 1 and 2)
+ guard (f 1 and (g 2 and 3) == g 1 and 2 + 4)
+ guard (f (10 + g and 1 1) and (g 2 and 3) == g 1 and 2 + 10 +6)