mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Modifications to Mix to adapt to FunctionDescription
This commit is contained in:
parent
5c7359aa09
commit
468f26b1cc
10
AST.cpp
10
AST.cpp
@ -607,6 +607,16 @@ Declaration const* FunctionDescription::getDeclaration() const
|
||||
return m_description.second;
|
||||
}
|
||||
|
||||
VariableDeclaration const* FunctionDescription::getVariableDeclaration() const
|
||||
{
|
||||
return dynamic_cast<VariableDeclaration const*>(m_description.second);
|
||||
}
|
||||
|
||||
FunctionDefinition const* FunctionDescription::getFunctionDefinition() const
|
||||
{
|
||||
return dynamic_cast<FunctionDefinition const*>(m_description.second);
|
||||
}
|
||||
|
||||
shared_ptr<FunctionType const> FunctionDescription::getFunctionTypeShared() const
|
||||
{
|
||||
return m_description.first;
|
||||
|
6
AST.h
6
AST.h
@ -200,8 +200,12 @@ struct FunctionDescription
|
||||
std::vector<ParamDescription> const getParameters() const;
|
||||
/// @returns the return parameters of the function
|
||||
std::vector<ParamDescription> const getReturnParameters() const;
|
||||
/// @returns the Declaration AST Node pointer
|
||||
/// @returns a generic Declaration AST Node pointer which can be either a FunctionDefinition or a VariableDeclaration
|
||||
Declaration const* getDeclaration() const;
|
||||
/// @returns the VariableDeclaration AST Node pointer or nullptr if it's not a VariableDeclaration
|
||||
VariableDeclaration const* getVariableDeclaration() const;
|
||||
/// @returns the FunctionDefinition AST Node pointer or nullptr if it's not a FunctionDefinition
|
||||
FunctionDefinition const* getFunctionDefinition() const;
|
||||
/// @returns a created shared pointer with the type of the function
|
||||
std::shared_ptr<FunctionType> makeFunctionType() const;
|
||||
/// @returns a pointer to the function type
|
||||
|
Loading…
Reference in New Issue
Block a user