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 | 722d3d263eaec76f28d3b23c848ad4bcb6a0ca1c (patch) | |
tree | 338e023f0f231a4ff1e5f216d8c8fdda67c19295 | |
parent | e456f1d86fcd66ee0edc09b31bee5373d74c7a72 (diff) | |
download | txr-722d3d263eaec76f28d3b23c848ad4bcb6a0ca1c.tar.gz txr-722d3d263eaec76f28d3b23c848ad4bcb6a0ca1c.tar.bz2 txr-722d3d263eaec76f28d3b23c848ad4bcb6a0ca1c.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 { |