Fixes after rebasing on develop

This commit is contained in:
Lefteris Karapetsas 2015-01-27 15:43:28 +01:00
parent 6e793b2499
commit ff91ab96ea
3 changed files with 7 additions and 4 deletions

View File

@ -563,7 +563,7 @@ vector<ParamDescription> const FunctionDescription::getParameters() const
if (function)
{
vector<ParamDescription> paramsDescription;
for (auto const& param: function->getReturnParameters())
for (auto const& param: function->getParameters())
paramsDescription.push_back(ParamDescription(param->getName(), param->getType()->toString()));
return paramsDescription;
@ -580,7 +580,7 @@ vector<ParamDescription> const FunctionDescription::getReturnParameters() const
if (function)
{
vector<ParamDescription> paramsDescription;
for (auto const& param: function->getParameters())
for (auto const& param: function->getReturnParameters())
paramsDescription.push_back(ParamDescription(param->getName(), param->getType()->toString()));
return paramsDescription;

4
AST.h
View File

@ -182,6 +182,10 @@ struct FunctionDescription
FunctionDescription(std::shared_ptr<FunctionType const> _type, Declaration const* _decl):
m_description(_type, _decl){}
/// constructor for a constructor's function definition. Used only inside mix.
FunctionDescription(Declaration const* _def):
m_description(nullptr, _def){}
FunctionDescription():
m_description(nullptr, nullptr){}

View File

@ -130,8 +130,7 @@ private:
/// also removes the reference from the stack (note that is does not reset the type to @a NONE).
/// @a _expression is the current expression, used for error reporting.
void retrieveValue(Expression const& _expression, bool _remove = false) const;
/// Convenience function to retrive Value from Storage. Specific version of
/// @ref retrieveValue
/// Convenience function to retrive Value from Storage. Specific version of @ref retrieveValue
void retrieveValueFromStorage(Expression const& _expression, bool _remove = false) const;
/// Stores a value (from the stack directly beneath the reference, which is assumed to
/// be on the top of the stack, if any) in the lvalue and removes the reference.