summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2024-06-30 13:45:57 +0200
committerGitHub <noreply@github.com>2024-06-30 13:45:57 +0200
commit8aa8b5834953cab15c0687608f4fafea2e6c61be (patch)
tree1835ae7c789136b4a6c44c12efd4247a0b96d893 /test
parent7125bb27fedaafd5a56b5122e4251b182448ddac (diff)
parent06d7c8dee25c065b1a569337f34d3cd5e892a31d (diff)
Merge pull request #10 from boozec/check-semantics
Co-Authored-By: geno <gabriele.genovese2@studio.unibo.it> Co-Authored-By: L0P0P <grassoemanuele@live.com>
Diffstat (limited to 'test')
-rw-r--r--test/1a.py8
-rw-r--r--test/1b.py6
-rw-r--r--test/1c.py5
-rw-r--r--test/trailers.py13
4 files changed, 32 insertions, 0 deletions
diff --git a/test/1a.py b/test/1a.py
new file mode 100644
index 0000000..69b3dc5
--- /dev/null
+++ b/test/1a.py
@@ -0,0 +1,8 @@
+
+x = 2
+y = z
+
+def f(x, y):
+ return x + y
+
+print(f(5, 3) + x + y)
diff --git a/test/1b.py b/test/1b.py
new file mode 100644
index 0000000..a8324a0
--- /dev/null
+++ b/test/1b.py
@@ -0,0 +1,6 @@
+x = 2 ; y = 3
+
+def f(x, x):
+ return x+y
+
+print(f(5,3)+ x + y)
diff --git a/test/1c.py b/test/1c.py
new file mode 100644
index 0000000..59e51e5
--- /dev/null
+++ b/test/1c.py
@@ -0,0 +1,5 @@
+
+def mult(a, b):
+ return a * b
+
+print(mult(3, 2, 4))
diff --git a/test/trailers.py b/test/trailers.py
new file mode 100644
index 0000000..278a2d4
--- /dev/null
+++ b/test/trailers.py
@@ -0,0 +1,13 @@
+
+def mult(nums):
+ ret = []
+ for a, b in nums:
+ ret.append(a * b)
+ return ret
+
+print(mult([(2, 4), (5, 2)]))
+
+
+# left, right = 1, 2
+# print(left)
+# print(right)