private function getFloat(Token $token)
{
$value = $token->getValue();
if (preg_match('/([^\\d]_[^\\d])|_[eE]|[eE]_|(_$)/', $value)) {
throw new ParseException('Invalid float number: underscore must be surrounded by at least one digit', $this->currentLine, $token->getValue());
}
$value = str_replace('_', '', $value);
if (preg_match('/^0\\d+/', $value)) {
throw new ParseException('Invalid float number: leading zeros are not allowed', $this->currentLine, $token->getValue());
}
return (double) $value;
}