------------ Дoбавленo:
По п.2 - поправил код
#hws
func doEnum(_data):java
fvar(k)
println(arr, ' = ', Array, ';')
if(issec("php"))
k = linked(Index)?(''+key+' => '):''
println('foreach(', arr, ' as ', k, value, ') {')
else
println('for( var ', _item, ' in ', arr, ') {')
end
block.inclvl()
if(issec("php"))
event(onEnum, value)
else
event(onEnum, arr && '[' && _item && ']')
end
block.declvl()
println('}')
event(onEndEnum)
end
func Item():java
if(issec("php"))
return(value)
else
return(arr && '[' && _item && ']')
end
end
func Index():java
if(issec("php"))
return(key)
else
return(_item)
end
end