def process_lasgn(exp)
out = ""
var = exp.shift
value = exp.shift
arg_count = 0
arg_count = value.length - 1 if value.first == :array
args = value
exp_type = exp.sexp_type
@env.add var.to_sym, exp_type
var_type = self.class.c_type exp_type
if exp_type.list? then
assert_type args, :array
raise "array must be of one type" unless args.sexp_type == Type.homo
args.shift
out << "#{var} = rb_ary_new2(#{args.length});\n"
args.each_with_index do |o,i|
out << "rb_ary_store(#{var}, #{i}, #{process o});\n"
end
else
out << "#{var} = #{process args}"
end
out.sub!(/;\n\Z/, '')
return out
end