summaryrefslogtreecommitdiff
path: root/main.lisp
diff options
context:
space:
mode:
authormRnea <akannemre@gmail.com>2024-08-14 00:42:24 +0300
committermRnea <akannemre@gmail.com>2024-08-14 00:42:24 +0300
commitb52e5b548ad1b9143818891d5642cf9470a41b53 (patch)
tree0ac6e6b43f1b2462d0ede77e0c35e611912015dc /main.lisp
parent3e855bbc2394445843143bb703c95dd694699f0e (diff)
added a simple test for macros, also more cli stuff
Diffstat (limited to 'main.lisp')
-rw-r--r--main.lisp17
1 files changed, 9 insertions, 8 deletions
diff --git a/main.lisp b/main.lisp
index a43f798..15b33a7 100644
--- a/main.lisp
+++ b/main.lisp
@@ -56,14 +56,22 @@
(finish))
(simulate-program (parse-tokens (lex-line line 0)))))
+(defun comp-options ()
+ (list (clingon:make-option
+ :filepath
+ :description "Kaynak dosyasını belirt."
+ :short-name #\k
+ :key :kaynak)))
+
(defun subcommands ()
(list (clingon:make-command
:name "derle"
:description "Dosyadaki programı derle"
:usage "<dosya-ismi>"
+ :options (comp-options)
:handler (lambda (cmd) (generate-program
(make-program
- (car (clingon:command-arguments cmd)))
+ (clingon:getopt cmd :kaynak))
:compile t)))
(clingon:make-command
:name "test"
@@ -122,13 +130,6 @@
;; :short-name #\s
;; :key :simulate)))
-;; (defun comp-options ()
-;; (list (clingon:make-option
-;; :filepath
-;; :description "Dosyadaki programı derle."
-;; :short-name #\c
-;; :key :compile)))
-
;; (defun test-options ()
;; (list (clingon:make-option
;; :flag