public function parse($load, $filename, $path = "") { list($cached, $codeOrPath, $actualPath) = $load; if ($cached) { // echo ' (in cache)'; if ($codeOrPath instanceof One_Script_Node_Root) { $this->rootNode = $codeOrPath; } else { $this->rootNode = One_Script_Cache::get($codeOrPath); } } else { // echo ' (NOT in cache )'; $parser = new One_Script_Parser($this); $this->rootNode = $parser->parse($codeOrPath, $filename, $path, $actualPath); One_Script_Cache::cache($actualPath, $this->rootNode); } if ($this->rootNode->isError()) { $this->error = $this->rootNode->error; } }