diff options
author | Christian <c@ethdev.com> | 2015-01-12 19:46:52 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-12 19:46:52 +0800 |
commit | 307a83e1dea95cd144a955aa0891476e7dd159de (patch) | |
tree | 5adca427a0debe24ba729bd3cd917c821c92ebca /Types.h | |
parent | 94cff9684f8b1d4a5e2eeba58444a99e32e8a7ae (diff) | |
download | dexon-solidity-307a83e1dea95cd144a955aa0891476e7dd159de.tar.gz dexon-solidity-307a83e1dea95cd144a955aa0891476e7dd159de.tar.zst dexon-solidity-307a83e1dea95cd144a955aa0891476e7dd159de.zip |
More convenient function type construction.
Diffstat (limited to 'Types.h')
-rw-r--r-- | Types.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -352,6 +352,10 @@ public: virtual Category getCategory() const override { return Category::FUNCTION; } explicit FunctionType(FunctionDefinition const& _function, bool _isInternal = true); + FunctionType(std::vector<std::string> const& _parameterTypes, + std::vector<std::string> const& _returnParameterTypes, + Location _location = Location::INTERNAL): + FunctionType(parseElementaryTypeVector(_parameterTypes), parseElementaryTypeVector(_returnParameterTypes), _location) {} FunctionType(TypePointers const& _parameterTypes, TypePointers const& _returnParameterTypes, Location _location = Location::INTERNAL): m_parameterTypes(_parameterTypes), m_returnParameterTypes(_returnParameterTypes), @@ -371,6 +375,8 @@ public: std::string getCanonicalSignature() const; private: + static TypePointers parseElementaryTypeVector(std::vector<std::string> const& _types); + TypePointers m_parameterTypes; TypePointers m_returnParameterTypes; Location m_location; |