more cleanup

This commit is contained in:
Yuichi Nishiwaki 2015-06-27 19:10:15 +09:00
parent ddcf96f689
commit 885942b541
1 changed files with 3 additions and 9 deletions

View File

@ -508,20 +508,14 @@ analyze_lambda(pic_state *pic, analyze_scope *scope, pic_value obj)
return analyze_defer(pic, scope, formals, body);
}
static pic_value
analyze_declare(pic_state *pic, analyze_scope *scope, pic_sym *var)
{
define_var(pic, scope, var);
return analyze_var(pic, scope, var);
}
static pic_value
analyze_define(pic_state *pic, analyze_scope *scope, pic_value obj)
{
pic_value var, val;
var = analyze_declare(pic, scope, pic_sym_ptr(pic_list_ref(pic, obj, 1)));
define_var(pic, scope, pic_sym_ptr(pic_list_ref(pic, obj, 1)));
var = analyze(pic, scope, pic_list_ref(pic, obj, 1), false);
val = analyze(pic, scope, pic_list_ref(pic, obj, 2), false);
return pic_list3(pic, pic_obj_value(pic->sSETBANG), var, val);