From 8c8d31ed2c4127ba2965bd6a40ff0293418bc1e2 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 1 Oct 2025 16:39:20 -0400 Subject: np: parse: Add initial function parsing logic Create basic parsing logic for functions, needs to be completed but provides great groundwork. We also added a better target to parse and we'll incrementally increase complexity as we advance Signed-off-by: Ian Moffett --- src/sys/np/sample/test-0.np | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/sys/np/sample/test-0.np (limited to 'src/sys/np/sample/test-0.np') diff --git a/src/sys/np/sample/test-0.np b/src/sys/np/sample/test-0.np new file mode 100644 index 0000000..b4ad2c1 --- /dev/null +++ b/src/sys/np/sample/test-0.np @@ -0,0 +1,16 @@ +proc +main() -> i8 +begin + u8 buf[8] + + if argc < 2 begin + return -1 + end + + for [i=0 : i<8 : i += 2] begin + buf[i] = 0x07 + end + + return 0 +end + -- cgit v1.2.3