summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-20 13:55:28 -0400
committerbd <bdunahu@operationnull.com>2025-03-20 13:55:28 -0400
commit5f010ed3f98ffb82fe94c1a31f3338485dd3fbb7 (patch)
tree342dd45b8487490df12e666f938a5cacdf82c97a /src
parent6e338215192c26dfb16236398ca8e3762a8d4d0e (diff)
Edit logic in main to error if passed file could not be opened.
Diffstat (limited to 'src')
-rw-r--r--src/main.lisp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.lisp b/src/main.lisp
index 1f0afdd..98176ec 100644
--- a/src/main.lisp
+++ b/src/main.lisp
@@ -43,9 +43,11 @@ _/_/ _/_/ "
;; complain about num arguments
((/= (length args) 1) (error "Wrong number of arguments."))
((not (util:asm-extension? file))
- (error "The file is not an asm source code file, or it could not be opened."))
+ (error "The file is not an asm source code file."))
(t (let ((tokens (lex:file->tokens file)))
- (format t "~a" tokens)
+ (if tokens
+ (format t "~a" tokens)
+ (error "The file does not exist, or it could not be opened."))
(format t "Nitimur in Vetitum~%"))))))