From df508744ec2975cec0ba05e8a4358c1c41265c4c Mon Sep 17 00:00:00 2001 From: bd Date: Thu, 10 Apr 2025 03:53:43 -0400 Subject: Add untested (but works on the single input file) code emission --- src/main.lisp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main.lisp') diff --git a/src/main.lisp b/src/main.lisp index 9692603..f20b022 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -38,10 +38,9 @@ _/_/ _/_/ " (error "The file is not an asm source code file.~%")) (t (let ((str (uiop:read-file-string file))) (if str - (progn (pprint (esrap:parse 'parse:str->ast (string-upcase str))) - (terpri) - (maphash #'(lambda (k v) (format t "~A => ~A~%" k v)) util:label-table) - (format t "---~%")) + (let ((ast (esrap:parse 'parse::str->ast (string-upcase str)))) + (when emit? + (format t "~a~%" (emit::emit ast)))) (error "The file does not exist, or it could not be opened.~%")) (format t "Nitimur in Vetitum~%")))))) -- cgit v1.2.3