protected function importFile($path, $out)
{
// see if tree is cached
$realPath = realpath($path);
if (isset($this->importCache[$realPath])) {
$this->handleImportLoop($realPath);
$tree = $this->importCache[$realPath];
} else {
$code = file_get_contents($path);
$parser = $this->parserFactory($path);
$tree = $parser->parse($code);
$this->importCache[$realPath] = $tree;
}
$pi = pathinfo($path);
array_unshift($this->importPaths, $pi['dirname']);
$this->compileChildrenNoReturn($tree->children, $out);
array_shift($this->importPaths);
}