aboutsummaryrefslogtreecommitdiffstats
path: root/Types.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-12 19:46:52 +0800
committerChristian <c@ethdev.com>2015-01-12 19:46:52 +0800
commit307a83e1dea95cd144a955aa0891476e7dd159de (patch)
tree5adca427a0debe24ba729bd3cd917c821c92ebca /Types.h
parent94cff9684f8b1d4a5e2eeba58444a99e32e8a7ae (diff)
downloaddexon-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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Types.h b/Types.h
index 335c58a3..031d45ea 100644
--- a/Types.h
+++ b/Types.h
@@ -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;