From 7d3856203d28281e3ffc6b365cc55b1d192a5599 Mon Sep 17 00:00:00 2001 From: standenboy Date: Thu, 25 Apr 2024 08:45:36 +0100 Subject: started cw --- comp/cw/code/parser/sample.zpy | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 comp/cw/code/parser/sample.zpy (limited to 'comp/cw/code/parser/sample.zpy') diff --git a/comp/cw/code/parser/sample.zpy b/comp/cw/code/parser/sample.zpy new file mode 100644 index 0000000..e289d9d --- /dev/null +++ b/comp/cw/code/parser/sample.zpy @@ -0,0 +1,15 @@ +{ +(let fib:function +(defun num:i32 i32 + (if (< num 2) + (return num) + ) + (else + (return (+ (fib (- num 1)) (fib (- num 2)) )) + ) +)) +} +(let a:i32 (fib 5)) +(const str[]:char "hello!") +! returns the 5th fib number +(const str[]:char "hello!") -- cgit v1.2.3