Ejemplo n.º 1
0
 private static function parseNode($value = null)
 {
     $instruction = $value->getName();
     switch ($instruction) {
         case "print":
             return Interpreter::_print($value);
         default:
             if (Util::isBuiltinFunction($instruction)) {
                 return Interpreter::callBuiltin($value);
             }
             throw new Exception("Unrecognized instruction {$instruction}.");
     }
 }