curr=parent.get(key,null);
}
if(curr==null) {
if(isArrayDef) {
Array arr = new ArrayImpl();
arr.appendEL(value);
parent.setEL(key,arr);
}
else parent.setEL(key,value);
}
else if(curr instanceof Array){
((Array) curr).appendEL(value);
}
else if(curr instanceof CastableStruct){
if(isLast) ((CastableStruct)curr).setValue(value);
else return (Struct) curr;
}
else if(curr instanceof Struct){
if(isLast) parent.setEL(key,value);
else return (Struct) curr;
}
else if(curr instanceof String){
if(isArrayDef) {
Array arr = new ArrayImpl();
arr.appendEL(curr);
arr.appendEL(value);
parent.setEL(key,arr);
}
else if(value instanceof Struct) {
parent.setEL(key,value);
}