function visit($node)
    {
        $method = "visit";

        if (is_object($node)) {
            $method .= join('', explode("\\", get_class($node)));
        } else {
            $method .= ucfirst(gettype($node));
        }

        if (!is_callable(array($this, $method))) {
            throw new UnexpectedValueException(sprintf(
                "No Visitor Method for Node of Type %s available", 
                is_object($node) ? get_class($node) : gettype($node)
            ));
        }

        return $this->$method($node);
    }