Start of line reader macros
This commit is contained in:
@@ -10,6 +10,10 @@ class ReaderMacroTestCase extends Test {
|
||||
Assert.equals("String that takes the rest of the line", ReaderMacroTestCase.myLine());
|
||||
}
|
||||
|
||||
function testReadNot() {
|
||||
Assert.isTrue(ReaderMacroTestCase.myBool());
|
||||
}
|
||||
|
||||
function testDefAlias() {
|
||||
Assert.equals(9, ReaderMacroTestCase.mySum);
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
(defreadermacro "!" [stream]
|
||||
(defreadermacro &start "!" [stream]
|
||||
(let [line (stream.expect "a string line" (lambda [] (stream.takeLine)))]
|
||||
(ReaderExp.StrExp line)))
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
!String that takes the rest of the line
|
||||
)
|
||||
|
||||
(defun myBool []
|
||||
(begin !false))
|
||||
|
||||
(defalias pluppers +)
|
||||
(defalias fluffers 5)
|
||||
(defalias buffers 4)
|
||||
|
Reference in New Issue
Block a user