projects
/
scheme.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ADT codegen working for simple types
[scheme.git]
/
main.scm
diff --git
a/main.scm
b/main.scm
index e2e96b8355b68cd43967977259c67ab91f7a5e1e..df8e656978b66349472e5a3599c12f5eb809f7f4 100644
(file)
--- a/
main.scm
+++ b/
main.scm
@@
-28,8
+28,13
@@
(define target (car (parse-args)))
(define file (cadr (parse-args)))
(define target (car (parse-args)))
(define file (cadr (parse-args)))
+(define (read-prog port)
+ (if (port-input-empty? port)
+ '()
+ (cons (read) (read-prog port))))
+
(compile-to-binary
(if (eqv? file 'stdin)
(compile-to-binary
(if (eqv? file 'stdin)
- (read)
- (call-with-input-file file read))
+ (read
-prog (current-input-port)
)
+ (call-with-input-file file read
-prog
))
"a.out" target)
"a.out" target)