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 | |
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.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib.c | 4 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,10 @@ +2014-01-27 Kaz Kylheku <kaz@kylheku.com> + + * 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. + 2014-01-26 Kaz Kylheku <kaz@kylheku.com> * regex.c (match_regex_right): New function. @@ -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) { |