protected function compileGlobal(Block $block)
{
foreach ($block->children as $child) {
switch ($child->getType()) {
case 'Stmt_Function':
$this->compileFunction($child);
break;
case 'Stmt_Class':
$this->compileClass($child);
break;
default:
throw new \RuntimeException("Could not compile global operation: " . $child->getType());
}
}
}