diff options
Diffstat (limited to 'libsolidity/ast/AST.cpp')
-rw-r--r-- | libsolidity/ast/AST.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp index 54ded609..2df31eed 100644 --- a/libsolidity/ast/AST.cpp +++ b/libsolidity/ast/AST.cpp @@ -530,7 +530,7 @@ IdentifierAnnotation& Identifier::annotation() const return dynamic_cast<IdentifierAnnotation&>(*m_annotation); } -bool Literal::hasHexPrefix() const +bool Literal::isHexNumber() const { if (token() != Token::Number) return false; @@ -542,7 +542,7 @@ bool Literal::looksLikeAddress() const if (subDenomination() != SubDenomination::None) return false; - if (!hasHexPrefix()) + if (!isHexNumber()) return false; return abs(int(value().length()) - 42) <= 1; @@ -550,6 +550,6 @@ bool Literal::looksLikeAddress() const bool Literal::passesAddressChecksum() const { - solAssert(hasHexPrefix(), "Expected hex prefix"); + solAssert(isHexNumber(), "Expected hex number"); return dev::passesAddressChecksum(value(), true); } |