fix analyze errer for (+) and (*)

This commit is contained in:
Sunrim KIM (keen) 2014-05-27 18:49:04 +09:00
parent d71666624b
commit cb3a975ed6
1 changed files with 2 additions and 2 deletions

View File

@ -561,7 +561,7 @@ analyze_add(analyze_state *state, pic_value obj, bool tailpos)
ARGC_ASSERT_GE(0);
switch (pic_length(pic, obj)) {
case 1:
return pic_int_value(0);
return pic_list2(pic, pic_symbol_value(pic->sQUOTE), pic_int_value(0));
case 2:
return analyze(state, pic_car(pic, pic_cdr(pic, obj)), tailpos);
default:
@ -598,7 +598,7 @@ analyze_mul(analyze_state *state, pic_value obj, bool tailpos)
ARGC_ASSERT_GE(0);
switch (pic_length(pic, obj)) {
case 1:
return pic_int_value(1);
return pic_list2(pic, pic_symbol_value(pic->sQUOTE), pic_int_value(1));
case 2:
return analyze(state, pic_car(pic, pic_cdr(pic, obj)), tailpos);
default: