function compile($codestr, $cleanup = 0) { global $type, $val, $next, $nextval, $jsp_i, $has_errors; #-- cut source code into lexograpic tokens jsc::lex($codestr); if (JS_DEBUG) { jsc::delex(); } #-- parse into bytecode $rescue = array($type, $val, $next, $nextval, $jsp_i); jsc::parse(); if ($cleanup) { unset($GLOBALS["tn"]); } list($type, $val, $next, $nextval, $jsp_i) = $rescue; return $has_errors; }