public function expects($token, $types)
{
if (!is_array($types)) {
$types = array($types);
}
if (!$this->is($token, $types)) {
$t = isset($token['token']) ? $token['token'] : 'NULL';
throw new ParseException('Expected ' . implode(',', $types) . ' but got ' . $t);
}
}