diff options
author | Christian <c@ethdev.com> | 2014-11-04 20:24:35 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-11-06 09:22:24 +0800 |
commit | de493c673f2e850505d79185d104012825a7eabc (patch) | |
tree | 9496584d066c4454e85a795a053ea0037860785a /Types.h | |
parent | e30d3f8d539882376b29a1fe8f4bf6bcaf8c1762 (diff) | |
download | dexon-solidity-de493c673f2e850505d79185d104012825a7eabc.tar.gz dexon-solidity-de493c673f2e850505d79185d104012825a7eabc.tar.zst dexon-solidity-de493c673f2e850505d79185d104012825a7eabc.zip |
Detect integer length from literals and remove "std::".
Diffstat (limited to 'Types.h')
-rw-r--r-- | Types.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -56,7 +56,8 @@ public: static std::shared_ptr<Type> fromMapping(Mapping const& _typeName); /// @} - /// Auto-detect the proper type for a literal + /// Auto-detect the proper type for a literal. @returns an empty pointer if the literal does + /// not fit any type. static std::shared_ptr<Type> forLiteral(Literal const& _literal); virtual Category getCategory() const = 0; @@ -95,6 +96,8 @@ public: }; virtual Category getCategory() const override { return Category::INTEGER; } + /// @returns the smallest integer type for the given literal or an empty pointer + /// if no type fits. static std::shared_ptr<IntegerType> smallestTypeForLiteral(std::string const& _literal); explicit IntegerType(int _bits, Modifier _modifier = Modifier::UNSIGNED); |