diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib.c | 12 |
2 files changed, 18 insertions, 0 deletions
@@ -1,5 +1,11 @@ 2014-01-15 Kaz Kylheku <kaz@kylheku.com> + * lib.c (obj_print, obj_pprint): Convert the internal representation + of @sym and @(expr ...) syntax back to these notations instead + of leaving them as (sys:var sym) and (sys:expr expr ...). + +2014-01-15 Kaz Kylheku <kaz@kylheku.com> + * eval.c (append_each_s, append_each_star_s): New symbol variables. (op_each, expand): Support append-each and append-each*. (eval_init): Initialize new symbol variables, and register @@ -4823,6 +4823,12 @@ val obj_print(val obj, val out) } else if (sym == splice_s) { put_string(lit(",*"), out); obj_print(second(obj), out); + } else if (sym == var_s && symbolp(second(obj))) { + put_char(chr('@'), out); + obj_print(second(obj), out); + } else if (sym == expr_s) { + put_char(chr('@'), out); + obj_print(rest(obj), out); } else { val iter; val closepar = chr(')'); @@ -4982,6 +4988,12 @@ val obj_pprint(val obj, val out) } else if (sym == splice_s) { put_string(lit(",*"), out); obj_pprint(second(obj), out); + } else if (sym == var_s && symbolp(second(obj))) { + put_char(chr('@'), out); + obj_print(second(obj), out); + } else if (sym == expr_s) { + put_char(chr('@'), out); + obj_print(rest(obj), out); } else { val iter; val closepar = chr(')'); |