From 4d8ffb6a29285f12d9ebd788727d633550510d7f Mon Sep 17 00:00:00 2001 From: bd Date: Thu, 3 Apr 2025 01:07:13 -0400 Subject: Add lexing for immediates, keywords, and associated tests --- src/main.lisp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main.lisp') diff --git a/src/main.lisp b/src/main.lisp index 98176ec..f6e5754 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -41,13 +41,14 @@ _/_/ _/_/ " (emit? (not (clingon:getopt cmd :parse)))) (cond ;; complain about num arguments - ((/= (length args) 1) (error "Wrong number of arguments.")) + ((/= (length args) 1) (error "Wrong number of arguments.~%")) ((not (util:asm-extension? file)) - (error "The file is not an asm source code file.")) + (error "The file is not an asm source code file.~%")) (t (let ((tokens (lex:file->tokens file))) (if tokens - (format t "~a" tokens) - (error "The file does not exist, or it could not be opened.")) + (progn (pprint tokens) + (terpri)) + (error "The file does not exist, or it could not be opened.~%")) (format t "Nitimur in Vetitum~%")))))) -- cgit v1.2.3