summaryrefslogtreecommitdiff
path: root/tests/test.odin
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-22 12:23:25 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-22 12:23:25 +0100
commit59b30c1305ff6bcb63c673898893edcda19e27e4 (patch)
treeb02b357f3f7a70f916284663ae94f57d64ac1d92 /tests/test.odin
parent8375f459638f942d51948d466d9365eaa0c2a500 (diff)
downloadcrep-59b30c1305ff6bcb63c673898893edcda19e27e4.tar.gz
Add Odin grammar
Diffstat (limited to 'tests/test.odin')
-rw-r--r--tests/test.odin30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/test.odin b/tests/test.odin
new file mode 100644
index 0000000..687615b
--- /dev/null
+++ b/tests/test.odin
@@ -0,0 +1,30 @@
+package main
+
+import "core:fmt"
+
+main :: proc() {
+ hello()
+ fmt.println(add(10, 20))
+}
+
+hello :: proc() {
+ fmt.println("Hello, Odin!")
+}
+
+add :: proc(a, b: int) -> int {
+ return a + b
+}
+
+Point :: struct {
+ x, y: f32,
+}
+
+Color :: enum {
+ Red,
+ Green,
+ Blue,
+}
+
+complex_proc :: proc(name: string, age: int, flags: ..bool) {
+ // ...
+}