summaryrefslogtreecommitdiffstats
path: root/tests/011
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-03-03 01:44:37 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-03-03 01:44:37 -0800
commit039e2ebdfa5670de7a35084fd480fe204afbdc8b (patch)
treeb9726ccd8d6b0d29bba921c8b96e433a4a4ed38e /tests/011
parent6cbd5aa63b23044c12817e0d442fe7678f6a0754 (diff)
downloadtxr-039e2ebdfa5670de7a35084fd480fe204afbdc8b.tar.gz
txr-039e2ebdfa5670de7a35084fd480fe204afbdc8b.tar.bz2
txr-039e2ebdfa5670de7a35084fd480fe204afbdc8b.zip
* parser.l: Allowing ^ to be a quote character, and adjusting definition
of identifiers to rule this out from being the first character of a symbol which has no prefix. Recognize the ^ character as a token in the NESTED state. * lib.c (obj_print, obj_pprint): Render sys:qquote as ^. * parser.y (choose_quote): Function removed. (n_expr): Recognize '^' as quasiquote. Removed all the "smart quote" hacks that try to make quote behave as quote or quasiquote, or try to cancel out unquotes and quotes. * tests/009/json.txr: Fixed to ^ quasiquote. * tests/010/reghash.txr: Likewise. * tests/011/macros-2.txr: Likewise. * tests/011/mandel.txr: Likewise. * tests/011/special-1.txr: Likewise. * txr.1: Updated docs. * genvim.txr: Revamped definitions for txr_ident and txl_ident so that unqualified identifiers cannot start with # or ^, but ones with @ or : in front can start with these characters. * txr.vim: Regenerated.
Diffstat (limited to 'tests/011')
-rw-r--r--tests/011/macros-2.txr2
-rw-r--r--tests/011/mandel.txr10
-rw-r--r--tests/011/special-1.txr2
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/011/macros-2.txr b/tests/011/macros-2.txr
index 0d63a13b..be385c6f 100644
--- a/tests/011/macros-2.txr
+++ b/tests/011/macros-2.txr
@@ -2,7 +2,7 @@
(defmacro while ((condition : result) . body)
(let ((cblk (gensym "cnt-blk-"))
(bblk (gensym "brk-blk-")))
- '(macrolet ((break (value) '(return-from ,',bblk ,value)))
+ ^(macrolet ((break (value) ^(return-from ,',bblk ,value)))
(symacrolet ((break (return-from ,bblk))
(continue (return-from ,cblk)))
(block ,bblk
diff --git a/tests/011/mandel.txr b/tests/011/mandel.txr
index 84200ffa..15195f33 100644
--- a/tests/011/mandel.txr
+++ b/tests/011/mandel.txr
@@ -13,9 +13,9 @@
(defvar y-offset (+ y-centre (* 0.5 pixel-size (+ j-max 1))))
;; complex number library
- (defmacro cplx (x y) '(cons ,x ,y))
- (defmacro re (c) '(car ,c))
- (defmacro im (c) '(cdr ,c))
+ (defmacro cplx (x y) ^(cons ,x ,y))
+ (defmacro re (c) ^(car ,c))
+ (defmacro im (c) ^(cdr ,c))
(defsymacro c0 (macro-time (cplx 0 0)))
@@ -23,9 +23,9 @@
(defun with-cplx-expand (specs body)
(tree-case specs
(((re im expr) . rest)
- '(tree-bind (,re . ,im) ,expr ,(with-cplx-expand rest body)))
+ ^(tree-bind (,re . ,im) ,expr ,(with-cplx-expand rest body)))
(() (tree-case body
- ((a b . rest) '(progn ,a ,b ,*rest))
+ ((a b . rest) ^(progn ,a ,b ,*rest))
((a) a)
(x (error "with-cplx: invalid body ~s" body))))
(x (error "with-cplx: bad args ~s" x)))))
diff --git a/tests/011/special-1.txr b/tests/011/special-1.txr
index 72ab844a..f3e92a03 100644
--- a/tests/011/special-1.txr
+++ b/tests/011/special-1.txr
@@ -1,6 +1,6 @@
@(do
(defmacro with-output-to-string ((var) . forms)
- '(let ((,var (make-string-output-stream)))
+ ^(let ((,var (make-string-output-stream)))
(progn ,*forms (get-string-from-stream ,var))))
(let ((x (with-output-to-string (*stdout*)