aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-29 21:35:28 +0800
committerChristian <c@ethdev.com>2015-01-30 04:26:11 +0800
commit4a6ed84386ed7bc3abd2b4cf2441b29a5af38816 (patch)
treea4428b3bd31d3b05383b61e060cd768c4a7604db /Types.cpp
parent3701543ae8dd8ffbfd58e5648d45699468f10a55 (diff)
downloaddexon-solidity-4a6ed84386ed7bc3abd2b4cf2441b29a5af38816.tar.gz
dexon-solidity-4a6ed84386ed7bc3abd2b4cf2441b29a5af38816.tar.zst
dexon-solidity-4a6ed84386ed7bc3abd2b4cf2441b29a5af38816.zip
Parsing of events.
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Types.cpp b/Types.cpp
index bebb4be1..0842e40b 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -633,6 +633,22 @@ FunctionType::FunctionType(VariableDeclaration const& _varDecl):
swap(retParamNames, m_returnParameterNames);
}
+FunctionType::FunctionType(const EventDefinition& _event):
+ m_location(Location::EVENT), m_declaration(&_event)
+{
+ TypePointers params;
+ vector<string> paramNames;
+ params.reserve(_event.getParameters().size());
+ paramNames.reserve(_event.getParameters().size());
+ for (ASTPointer<VariableDeclaration> const& var: _event.getParameters())
+ {
+ paramNames.push_back(var->getName());
+ params.push_back(var->getType());
+ }
+ swap(params, m_parameterTypes);
+ swap(paramNames, m_parameterNames);
+}
+
bool FunctionType::operator==(Type const& _other) const
{
if (_other.getCategory() != getCategory())