From aba056045000ed165027829eef93d469cc04b35d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 15 Jan 2014 22:50:25 -0800 Subject: * 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 ...). --- ChangeLog | 6 ++++++ lib.c | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 378961d5..94760add 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-01-15 Kaz Kylheku + + * 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 * eval.c (append_each_s, append_each_star_s): New symbol variables. diff --git a/lib.c b/lib.c index 2f5264d7..683b8e3d 100644 --- a/lib.c +++ b/lib.c @@ -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(')'); -- cgit v1.2.3