klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 36a7b15516f0cb36b74288a218d6fc5c4ddc92a4
parent a3a8cb1b47042ff83890b8c2b50cbfef5c6952e6
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri, 29 Apr 2011 20:21:32 -0300

Added source code info to the repl-loop continuation to have locations for errors at the topmost level.

Diffstat:
Msrc/krepl.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/krepl.c b/src/krepl.c @@ -71,6 +71,12 @@ void do_repl_eval(klisp_State *K, TValue *xparams, TValue obj) kset_cc(K, K->root_cont); kapply_cc(K, KINERT); } else { + /* save the source code info of the object in loop_cont + before evaling */ +#if KTRACK_SI + kset_source_info(K, kget_cc(K), ktry_get_si(K, obj)); +#endif + ktail_eval(K, obj, denv); } }