klisp

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

commit e1df2adc62afad7ecc1818d932de6e53b7f15969
parent 5cdfefd27bd1fbdc76c42a340ea067e8f7f21ab0
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri, 22 Apr 2011 00:20:58 -0300

Bugfix: '\t' & '\n' updated source info but regular chars did not!

Diffstat:
Msrc/kstate.h | 1-
Msrc/ktoken.c | 2+-
2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/kstate.h b/src/kstate.h @@ -29,7 +29,6 @@ typedef struct { int32_t line; int32_t col; - TValue saved_filename; int32_t saved_line; int32_t saved_col; } ksource_info_t; diff --git a/src/ktoken.c b/src/ktoken.c @@ -187,6 +187,7 @@ int ktok_getc(klisp_State *K) { K->ktok_source_info.col = 0; return '\n'; } else { + K->ktok_source_info.col++; return chi; } } @@ -209,7 +210,6 @@ int ktok_peekc(klisp_State *K) { void ktok_save_source_info(klisp_State *K) { - K->ktok_source_info.saved_filename = K->ktok_source_info.filename; K->ktok_source_info.saved_line = K->ktok_source_info.line; K->ktok_source_info.saved_col = K->ktok_source_info.col; }