Reader macros implemented in Kiss

This commit is contained in:
2020-12-09 13:36:50 -07:00
parent 00193a8fed
commit cfaa6aec2f
4 changed files with 29 additions and 21 deletions

View File

@@ -1,4 +1,6 @@
(defreadermacro "!" [stream] #|ReaderExp.StrExp(stream.expect("a string line", function () stream.takeLine()))|#)
(defreadermacro "!" [stream]
(let [line (stream.expect "a string line" (lambda [] (stream.takeLine)))]
(ReaderExp.StrExp line)))
(defun myLine []
!String that takes the rest of the line