diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-01-27 00:13:22 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-01-27 00:13:22 -0800 |
commit | 09eb73cde9c64e6fa29cbb410b25c6dd84a8a6f2 (patch) | |
tree | 2011d48a22860ee0c44c5b8b3bd6b6cd5cc2ff3e /lib.c | |
parent | c150e646fa90409c412f07f59edbb897bdbb4997 (diff) | |
download | txr-09eb73cde9c64e6fa29cbb410b25c6dd84a8a6f2.tar.gz txr-09eb73cde9c64e6fa29cbb410b25c6dd84a8a6f2.tar.bz2 txr-09eb73cde9c64e6fa29cbb410b25c6dd84a8a6f2.zip |
* lib.c (obj_print, obj_pprint): Bugfix: there may be
additional expressions forms in (sys:var <sym>) after
the sym. These were not being printed. Such syntax occurs
often in the TXR pattern language.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -5049,7 +5049,7 @@ 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))) { + } else if (sym == var_s && symbolp(second(obj)) && !cdr(cdr(obj))) { put_char(chr('@'), out); obj_print(second(obj), out); } else if (sym == expr_s) { @@ -5214,7 +5214,7 @@ 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))) { + } else if (sym == var_s && symbolp(second(obj)) && !cdr(cdr(obj))) { put_char(chr('@'), out); obj_print(second(obj), out); } else if (sym == expr_s) { |