diff options
author | Ian Moffett <ian@osmora.org> | 2025-10-01 16:39:20 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-10-01 16:40:12 -0400 |
commit | 8c8d31ed2c4127ba2965bd6a40ff0293418bc1e2 (patch) | |
tree | eccdb84b6b8f5da2ea55c7e7ccbe7419ce4cc3d0 /src/sys/np/sample/test-0.np | |
parent | ec3f0a41258099b4aa04ce236d062ffe0580f27d (diff) |
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 <ian@osmora.org>
Diffstat (limited to 'src/sys/np/sample/test-0.np')
-rw-r--r-- | src/sys/np/sample/test-0.np | 16 |
1 files changed, 16 insertions, 0 deletions
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 + |