summaryrefslogtreecommitdiffstats
path: root/hash.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-03-14 14:38:51 -0700
committerKaz Kylheku <kaz@kylheku.com>2012-03-14 14:38:51 -0700
commit4e1170250c22dbc1938e60538aef9f800cf8af92 (patch)
tree7b2ebf16559c4cddcfb87860f538f9b5250e08dd /hash.h
parent0592949de3e274b7d9700ec74466b541055c3bca (diff)
downloadtxr-4e1170250c22dbc1938e60538aef9f800cf8af92.tar.gz
txr-4e1170250c22dbc1938e60538aef9f800cf8af92.tar.bz2
txr-4e1170250c22dbc1938e60538aef9f800cf8af92.zip
Support quasiquoting over vectors also, and a bugfix for hash
quasiquoting. We cannot use the same symbol for the literal form from the parser, and for the expanded form, because this creates a confusion when there are multiple nestings of quasiquote expansion. * eval.c (vector_lit_s, vector_list_s, hash_lit_s): New symbol variables. (hash_construct_s): Relocated here from hash.c. (expand_qquote): Part of bugfix: look for hash_lit_s instead of has_construct_s. Translate to a hash_construct_s form which is no longer recognizes as a hash literal. Implementing recognition of a quasiquote vector literal, handled similarly. (eval_init): Initialize vector_lit_s, vector_list_s, hash_list_s and hash_lit_s. Use vector_list_s when registering vector_list function. * eval.h (vector_lit_s, vector_list_s, hash_lit_s, hash_constuct_s): Declared. * hash.c (hash_construct_s): Variable removed and relocated into eval.c. (hash_init): Initialization of hash_construct_s removed. * hash.h (hash_construct_s): Declaration removed. * parser.y: (vector): Action updated to generate a (vec-lit ...) form if the object contains unquotes, otherwise generate a vector object. (hash): Generate hash-lit form, not a hash-construct form.
Diffstat (limited to 'hash.h')
-rw-r--r--hash.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/hash.h b/hash.h
index 72752f72..3796882b 100644
--- a/hash.h
+++ b/hash.h
@@ -25,7 +25,6 @@
*/
extern val weak_keys_k, weak_vals_k, equal_based_k;
-extern val hash_construct_s;
val make_hash(val weak_keys, val weak_vals, val equal_based);
val *gethash_l(val hash, val key, val *new_p);