From d7f8d67bf26b1fbce3ccdcc873550cc6110ebeef Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Tue, 26 Nov 2013 16:52:30 -0800 Subject: [PATCH] debug-print when unbound symbol is found --- src/codegen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/codegen.c b/src/codegen.c index 57340867..98320508 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -201,7 +201,10 @@ codegen(codegen_state *state, pic_value obj, bool tailpos) name = pic_symbol_name(pic, pic_sym(obj)); s = scope_lookup(state, name, &depth, &idx); if (! s) { - pic_error(pic, "unbound variable"); +#if DEBUG + printf("%s\n", name); +#endif + pic_error(pic, "symbol: unbound variable"); } switch (depth) {