Add stricter hex underscore rules

This commit is contained in:
Balajiganapathi S
2018-08-08 12:05:51 +02:00
committed by Christian Parpart
parent 0000bfc604
commit 09a36cba02
7 changed files with 86 additions and 20 deletions
+4 -1
View File
@@ -39,6 +39,7 @@
#include <boost/range/algorithm/copy.hpp>
#include <boost/range/adaptor/sliced.hpp>
#include <boost/range/adaptor/transformed.hpp>
#include <boost/algorithm/string.hpp>
#include <limits>
@@ -779,7 +780,9 @@ tuple<bool, rational> RationalNumberType::isValidLiteral(Literal const& _literal
if (boost::starts_with(_literal.value(), "0x"))
{
// process as hex
value = bigint(_literal.value());
ASTString valueString = _literal.value();
boost::erase_all(valueString, "_");// Remove underscore separators
value = bigint(valueString);
}
else if (expPoint != _literal.value().end())
{