diff options
| author | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-28 23:59:34 +0800 |
|---|---|---|
| committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-29 00:01:55 +0800 |
| commit | 06fe61f89bc3f576176a665b851d9b95f9175618 (patch) | |
| tree | 6ceffc7d88e5a7e6dd9118520c9f0d4ed156574b /libsolidity/ast | |
| parent | 8b0c866f025f3b48db36b0e48451062806a1ab06 (diff) | |
| download | dexon-solidity-06fe61f89bc3f576176a665b851d9b95f9175618.tar dexon-solidity-06fe61f89bc3f576176a665b851d9b95f9175618.tar.gz dexon-solidity-06fe61f89bc3f576176a665b851d9b95f9175618.tar.bz2 dexon-solidity-06fe61f89bc3f576176a665b851d9b95f9175618.tar.lz dexon-solidity-06fe61f89bc3f576176a665b851d9b95f9175618.tar.xz dexon-solidity-06fe61f89bc3f576176a665b851d9b95f9175618.tar.zst dexon-solidity-06fe61f89bc3f576176a665b851d9b95f9175618.zip | |
Rename to isHexNumber()
Diffstat (limited to 'libsolidity/ast')
| -rw-r--r-- | libsolidity/ast/AST.cpp | 6 | ||||
| -rw-r--r-- | libsolidity/ast/AST.h | 2 |
2 files changed, 4 insertions, 4 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); } diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index 24b16176..e8831dc0 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -1591,7 +1591,7 @@ public: SubDenomination subDenomination() const { return m_subDenomination; } /// @returns true if this is a number with a hex prefix. - bool hasHexPrefix() const; + bool isHexNumber() const; /// @returns true if this looks like a checksummed address. bool looksLikeAddress() const; |
