diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-05 11:09:07 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-05 11:09:07 -0700 |
commit | 5fb2d4a21816d2d06ec0b12ff7be5b09a7771ce4 (patch) | |
tree | 46dad3990fcbbf1935c531f4a526ecc63d141825 /txr.c | |
parent | 59681c49080f395057548e0d848fbde40d3f0c34 (diff) | |
download | txr-5fb2d4a21816d2d06ec0b12ff7be5b09a7771ce4.tar.gz txr-5fb2d4a21816d2d06ec0b12ff7be5b09a7771ce4.tar.bz2 txr-5fb2d4a21816d2d06ec0b12ff7be5b09a7771ce4.zip |
Syntax errors refer to REPL line number.
* eval.c (eval_init): Registrations of lisp-parse and read must
account for new optional argument.
* lib.c (func_n5o): New function.
* lib.h (func_n5o): Declared.
* parser.c (lisp_parse): New argument for passing in line number.
This is punched into the parser object.
(read_eval_stream): Call to lisp_parse defaults new argument.
(repl): Pass repl line number to lisp_parse.
* parser.h (lisp_parse): Declaration updated.
* txr.c (txr_main): Call to lisp_parse defaults new argument.
Diffstat (limited to 'txr.c')
-rw-r--r-- | txr.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -580,7 +580,7 @@ int txr_main(int argc, char **argv) spec_file = arg; break; case 'e': - eval_intrinsic(lisp_parse(arg, std_error, colon_k, colon_k), + eval_intrinsic(lisp_parse(arg, std_error, colon_k, colon_k, colon_k), make_env(bindings, nil, nil)); evaled = t; break; @@ -593,7 +593,8 @@ int txr_main(int argc, char **argv) if3(c_chr(opt) == 'P', pprinl, tprint)); - pf(eval_intrinsic(lisp_parse(arg, std_error, colon_k, colon_k), + pf(eval_intrinsic(lisp_parse(arg, std_error, colon_k, + colon_k, colon_k), make_env(bindings, nil, nil)), std_output); evaled = t; } |