diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-05-29 00:02:41 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-05-29 00:02:41 -0700 |
commit | 0bc1df959700cc60ad6f9f289bcb905dc294ceb1 (patch) | |
tree | 338e023f0f231a4ff1e5f216d8c8fdda67c19295 | |
parent | 2ec8502b72574b244c1ed1e07383d8735aa90ac0 (diff) | |
download | txr-0bc1df959700cc60ad6f9f289bcb905dc294ceb1.tar.gz txr-0bc1df959700cc60ad6f9f289bcb905dc294ceb1.tar.bz2 txr-0bc1df959700cc60ad6f9f289bcb905dc294ceb1.zip |
repl: syntax error diag improvement.
* parser.c (repl): syntax error exceptions carry some text as
an argument, which we now print. This distinguishes
end-of-stream syntax errors from real ones.
-rw-r--r-- | parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1616,7 +1616,7 @@ val repl(val bindings, val in_stream, val out_stream, val env) lino_hist_add(ls, line_w); if (uw_exception_subtype_p(exsym, syntax_error_s)) { - put_line(lit("** syntax error"), out_stream); + format(out_stream, lit("** syntax error: ~a\n"), car(exvals), nao); } else if (uw_exception_subtype_p(exsym, error_s)) { error_trace(exsym, exvals, out_stream, lit("**")); } else { |