begin -> do
Shorter and doesn't imply existence of `end'
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
;; atom-to-fmt-c
|
||||
(test '%fun (atom-to-fmt-c 'fn))
|
||||
(test '%prototype (atom-to-fmt-c 'prototype))
|
||||
(test '%block-begin (atom-to-fmt-c 'begin))
|
||||
(test '%block-begin (atom-to-fmt-c 'do))
|
||||
(test '%define (atom-to-fmt-c 'define))
|
||||
(test '%pointer (atom-to-fmt-c 'pointer))
|
||||
(test '%array (atom-to-fmt-c 'array))
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
" (break))" ; 45
|
||||
" (default" ; 46
|
||||
" (putchar 120)))" ; 47
|
||||
" (begin" ; 48
|
||||
" (do" ; 48
|
||||
" (var bvar int 121)" ; 49
|
||||
" (putchar bvar))" ; 50
|
||||
" (goto done)" ; 51
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
(pub defmacro (list-for-each list-type list-var elt-type elt-var what-do)
|
||||
(let ((list-var-2 (cat list-var '-2)))
|
||||
`(begin
|
||||
`(do
|
||||
(var ,list-var-2 (* ,list-type) ,list-var)
|
||||
(var ,elt-var ,elt-type (-> ,list-var-2 value))
|
||||
(while (!= (-> ,list-var-2 next) NULL)
|
||||
|
||||
Reference in New Issue
Block a user