added a simple test for macros, also more cli stuff
This commit is contained in:
17
main.lisp
17
main.lisp
@@ -56,14 +56,22 @@
|
|||||||
(finish))
|
(finish))
|
||||||
(simulate-program (parse-tokens (lex-line line 0)))))
|
(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 ()
|
(defun subcommands ()
|
||||||
(list (clingon:make-command
|
(list (clingon:make-command
|
||||||
:name "derle"
|
:name "derle"
|
||||||
:description "Dosyadaki programı derle"
|
:description "Dosyadaki programı derle"
|
||||||
:usage "<dosya-ismi>"
|
:usage "<dosya-ismi>"
|
||||||
|
:options (comp-options)
|
||||||
:handler (lambda (cmd) (generate-program
|
:handler (lambda (cmd) (generate-program
|
||||||
(make-program
|
(make-program
|
||||||
(car (clingon:command-arguments cmd)))
|
(clingon:getopt cmd :kaynak))
|
||||||
:compile t)))
|
:compile t)))
|
||||||
(clingon:make-command
|
(clingon:make-command
|
||||||
:name "test"
|
:name "test"
|
||||||
@@ -122,13 +130,6 @@
|
|||||||
;; :short-name #\s
|
;; :short-name #\s
|
||||||
;; :key :simulate)))
|
;; :key :simulate)))
|
||||||
|
|
||||||
;; (defun comp-options ()
|
|
||||||
;; (list (clingon:make-option
|
|
||||||
;; :filepath
|
|
||||||
;; :description "Dosyadaki programı derle."
|
|
||||||
;; :short-name #\c
|
|
||||||
;; :key :compile)))
|
|
||||||
|
|
||||||
;; (defun test-options ()
|
;; (defun test-options ()
|
||||||
;; (list (clingon:make-option
|
;; (list (clingon:make-option
|
||||||
;; :flag
|
;; :flag
|
||||||
|
|||||||
6
test/makro.lorth
Normal file
6
test/makro.lorth
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
;;; test
|
||||||
|
;;; (format nil "Hello world!..~%")
|
||||||
|
makro write değiş 1 syscall-3 son
|
||||||
|
makro stdout 1 son
|
||||||
|
|
||||||
|
stdout "Hello world!..\n" write
|
||||||
Reference in New Issue
Block a user