about summary refs log tree commit diff
path: root/third_party/lisp/quasiquote_2
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-01-22T21·40+0000
committerVincent Ambo <tazjin@google.com>2020-01-22T21·40+0000
commitd6e473068e2241628371e9a29742d81f41ac1788 (patch)
tree6c5d7dad01087867741660a524ba9bc53f62578a /third_party/lisp/quasiquote_2
parentce989529baedb471e17757f2789681580d02f65c (diff)
feat(third_party/lisp): Add 'iterate' and 'quasiquote-2.0' packages r/451
Diffstat (limited to 'third_party/lisp/quasiquote_2')
-rw-r--r--third_party/lisp/quasiquote_2/default.nix17
-rw-r--r--third_party/lisp/quasiquote_2/quasiquote-2.0.lisp6
2 files changed, 20 insertions, 3 deletions
diff --git a/third_party/lisp/quasiquote_2/default.nix b/third_party/lisp/quasiquote_2/default.nix
new file mode 100644
index 000000000000..3febfca2b68d
--- /dev/null
+++ b/third_party/lisp/quasiquote_2/default.nix
@@ -0,0 +1,17 @@
+# Quasiquote more suitable for macros that define other macros
+{ pkgs, ... }:
+
+pkgs.nix.buildLisp.library {
+  name = "quasiquote-2.0";
+
+  deps = [
+    pkgs.third_party.lisp.iterate
+  ];
+
+  srcs = [
+    ./package.lisp
+    ./quasiquote-2.0.lisp
+    ./macros.lisp
+    ./readers.lisp
+  ];
+}
diff --git a/third_party/lisp/quasiquote_2/quasiquote-2.0.lisp b/third_party/lisp/quasiquote_2/quasiquote-2.0.lisp
index 9ce0425d56af..10043fe0ecbc 100644
--- a/third_party/lisp/quasiquote_2/quasiquote-2.0.lisp
+++ b/third_party/lisp/quasiquote_2/quasiquote-2.0.lisp
@@ -26,6 +26,9 @@
 
 (defparameter *injectors* nil)
 
+(defparameter *void-elt* nil)
+(defparameter *void-filter-needed* nil)
+
 ;; (defmacro with-injector-parsed (form)
 ;;   `(let ((kwd (intern (string 
 
@@ -199,9 +202,6 @@
   (and (consp form)
        (find (car form) *known-macro-injectors* :test #'eq)))
 
-(defparameter *void-elt* nil)
-(defparameter *void-filter-needed* nil)
-
 (defun filter-out-voids (lst void-sym)
   (let (caars cadrs cdars cddrs)
     ;; search for all occurences of VOID