Implemented read-level portion of quasiquote forms.
[scheme.forth.jl.git] / scheme.4th
index 57ee1e6..fc307d7 100644 (file)
@@ -262,15 +262,18 @@ objvar symbol-table
     does> dup @ swap 1+ @
 ;
 
-create-symbol quote         quote-symbol
-create-symbol define        define-symbol
-create-symbol define-macro  define-macro-symbol
-create-symbol set!          set!-symbol
-create-symbol ok            ok-symbol
-create-symbol if            if-symbol
-create-symbol lambda        lambda-symbol
-create-symbol λ             λ-symbol
-create-symbol begin         begin-symbol
+create-symbol quote             quote-symbol
+create-symbol quasiquote        quasiquote-symbol
+create-symbol unquote           unquote-symbol
+create-symbol unquote-splicing  unquote-splicing-symbol
+create-symbol define            define-symbol
+create-symbol define-macro      define-macro-symbol
+create-symbol set!              set!-symbol
+create-symbol ok                ok-symbol
+create-symbol if                if-symbol
+create-symbol lambda            lambda-symbol
+create-symbol λ                 λ-symbol
+create-symbol begin             begin-symbol
 
 \ }}}
 
@@ -966,6 +969,21 @@ parse-idx-stack parse-idx-sp !
         quote-symbol recurse nil cons cons exit
     then
 
+    nextchar [char] ` = if
+        inc-parse-idx
+        quasiquote-symbol recurse nil cons cons exit
+    then
+
+    nextchar [char] , = if
+        inc-parse-idx
+        nextchar [char] @ = if
+            inc-parse-idx
+            unquote-splicing-symbol recurse nil cons cons exit
+        else
+            unquote-symbol recurse nil cons cons exit
+        then
+    then
+
     eof? if
         EOF character-type
         inc-parse-idx
@@ -1361,9 +1379,7 @@ hide env
             ( env exp env opname mproc )
             2swap 2drop -2rot 2drop cdr ( env mproc body )
 
-            2dup print cr
             macro-expand
-            2dup print cr
 
             2swap
             ['] eval goto-deferred
@@ -1630,7 +1646,7 @@ variable gc-stack-depth
 
     include scheme-primitives.4th
 
-    s" scheme-library.scm" load 2drop
+    s" scheme-library.scm" load 2drop
     
 \ }}}