klisp

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

commit a0140f0fc439e3e62838788e9c8f54190330158a
parent 94411bffa8f1226cb271fc9c708cb2f16d757b5e
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Sun, 29 May 2011 16:08:43 -0300

Added (not quite correct) source info to the list read while loading files.

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

diff --git a/src/kgports.c b/src/kgports.c @@ -341,6 +341,14 @@ TValue read_all_expr(klisp_State *K, TValue port) return kcutoff_dummy1(K); } else { TValue new_pair = kimm_cons(K, obj, KNIL); +#if KTRACK_SI + /* put the source info */ + /* XXX: should first read all comments and whitespace, + then save the source info, then read the object and + lastly put the saved source info on the new pair... + For now this will do, but it's not technically correct */ + kset_source_info(K, new_pair, ktry_get_si(K, obj)); +#endif kset_cdr_unsafe(K, tail, new_pair); tail = new_pair; }