protected function handleToken(array $token = null)
{
$token = $token ? $token : $this->getToken();
//Put together the method name
$method = 'handle' . ucfirst($token['type']);
//If the token has no handler, we throw an error
if (!method_exists($this, $method)) {
$this->throwException("Unexpected token `{$token['type']}` encountered, no handler {$method} found. " . "It seems you added custom tokens. Please extend the Parser and add a {$method}-method for that token", $token);
} else {
//Call the handler method and pass the token array as the first argument
call_user_func([$this, $method], $token);
}
}