changed array to string
This commit is contained in:
parent
83354f6bc7
commit
cfe1347bf4
14
src/cast.cc
14
src/cast.cc
|
@ -42,15 +42,15 @@ object cast_o(object i, type t, state* s){
|
|||
}
|
||||
if(i.type==ARRAY){
|
||||
i.type = STRING;
|
||||
out = "{ ";
|
||||
//out = "{ ";
|
||||
for(object o : std::get<std::vector<object>>(i.value)){
|
||||
out += std::get<std::string>(cast_o(o,STRING,s).value) + ", ";
|
||||
out += std::get<std::string>(cast_o(o,STRING,s).value);
|
||||
}
|
||||
if(out!="{ "){
|
||||
out[out.size()-1] = ' ';
|
||||
out[out.size()-2] = ' ';
|
||||
}
|
||||
out+="}";
|
||||
//if(out!="{ "){
|
||||
// out[out.size()-1] = ' ';
|
||||
// out[out.size()-2] = ' ';
|
||||
//}
|
||||
//out+="}";
|
||||
i.value = out;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue