From cb3a975ed6b57cb0829b3b5a3aa8afcd523f0645 Mon Sep 17 00:00:00 2001 From: "Sunrim KIM (keen)" <3han5chou7@gmail.com> Date: Tue, 27 May 2014 18:49:04 +0900 Subject: [PATCH] fix analyze errer for (+) and (*) --- src/codegen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/codegen.c b/src/codegen.c index 2d052739..5e091d07 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -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: