summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-03-13 21:34:18 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-03-13 21:34:18 +0100
commit19a3dc32e4fdc1743f0317cacf8c80acbd71d4ae (patch)
tree12447e5d869408659d51d6a2674a7495472f4ef0
parent677f074370336cc5a35f10e9d00bd953a3c50f59 (diff)
Add a simple example use case for the type declaration reader macro.
darcs-hash:9c106c264ce3bd412038f9271cd6957ebd50c155
-rw-r--r--Lisp/internal-reader-syntax.lisp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Lisp/internal-reader-syntax.lisp b/Lisp/internal-reader-syntax.lisp
index b637f85..fd2ec5f 100644
--- a/Lisp/internal-reader-syntax.lisp
+++ b/Lisp/internal-reader-syntax.lisp
@@ -126,3 +126,18 @@
collect `(type ,type ,arg-name)))
(the ,return-type
,@real-body))))))))
+
+
+;; Quick test.
+#||
+\(progn
+ #.(disable-type-declaration-syntax)
+ #.(enable-type-declaration-syntax)
+ (pprint
+ '#? symbol t * &rest list ->
+ (defun typespec-name->type-id (typespec-name x y &rest rest)
+ "abc"
+ (declare foo)
+ "mulk"
+ (type-name->type-id (typespec-name->type-name typespec-name)))))
+||#