debug-print when unbound symbol is found

This commit is contained in:
Yuichi Nishiwaki 2013-11-26 16:52:30 -08:00
parent 38ab43d7fc
commit d7f8d67bf2
1 changed files with 4 additions and 1 deletions

View File

@ -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) {