summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile2
-rw-r--r--test.lang4
3 files changed, 6 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 68e2fb3..5ab0e6b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
-a.out
+lang
*.o
out.pdf
diff --git a/Makefile b/Makefile
index 6e6b8c9..265c2f9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-EXE = a.out
+EXE = lang
RUNARGS = test.lang
CFLAGS = -std=c23 -Wall -Wextra -Wpedantic ${CFLAGS_${DEBUG}}
diff --git a/test.lang b/test.lang
index e57f630..11f09d3 100644
--- a/test.lang
+++ b/test.lang
@@ -1,3 +1,7 @@
+func square(x i64) i64 {
+ return x * x
+}
+
func main(a, b i64) i64 {
if a < b {
let t = a