summaryrefslogtreecommitdiff
path: root/comp/lucas-standen-NEA/code2/sample.zpy
diff options
context:
space:
mode:
Diffstat (limited to 'comp/lucas-standen-NEA/code2/sample.zpy')
-rw-r--r--comp/lucas-standen-NEA/code2/sample.zpy25
1 files changed, 6 insertions, 19 deletions
diff --git a/comp/lucas-standen-NEA/code2/sample.zpy b/comp/lucas-standen-NEA/code2/sample.zpy
index 1eea0f4..57b954f 100644
--- a/comp/lucas-standen-NEA/code2/sample.zpy
+++ b/comp/lucas-standen-NEA/code2/sample.zpy
@@ -1,22 +1,9 @@
-(symbol putchar int c:int)
-(symbol getchar int)
-
-(defun read char* str:char*)
- (let count:int 0)
- (for c:char (getchar) (!= c '\n') 0)
- (set str[count] c)
- (set c (getchar))
- (set count (+ count 1))
- (endfor)
- (return str)
-(endfun)
+(struct ll)
+ (def data:void*)
+ (def next:ll*)
+(endstruct)
(defun main int)
- (let str:char* (alloc 10))
-
- (set str (read str))
-
- (for i:int 0 (< i 10) 1)
- (putchar str[i])
- (endfor)
+ (let node:ll* (alloc (sizeof ll*)))
+ (return 0)
(endfun)