$funcs = array();
// do not allow nested functions..?
- $fstart = 0;
+ $fstart = -1;
$indent = 1;
$ret = &$out;
$in = str_repeat(" ", $indent);
$ret[] = $in . "}";
if ($fstart == $indent) {
- $fstart = 0;
+ $fstart = -1;
$ret = &$out;
}
continue;
case (substr($item,1,9) == 'function:'):
$fstart = $indent;
$indent++;
- $ret = &$funct;
+ $ret = &$funcs;
$def = substr($item,10,-1) ;
list($name,$body) = explode('(', $def, 2);