Add function selector to FunctionDefinition AST JSON

This commit is contained in:
Gaith Hallak
2019-12-16 15:16:54 +03:00
parent 200747e298
commit 371e6a4801
6 changed files with 29 additions and 0 deletions
+11
View File
@@ -368,6 +368,11 @@ string FunctionDefinition::externalSignature() const
return TypeProvider::function(*this)->externalSignature();
}
string FunctionDefinition::externalIdentifierHex() const
{
return TypeProvider::function(*this)->externalIdentifierHex();
}
FunctionDefinitionAnnotation& FunctionDefinition::annotation() const
{
if (!m_annotation)
@@ -596,6 +601,12 @@ set<VariableDeclaration::Location> VariableDeclaration::allowedDataLocations() c
return set<Location>{ Location::Unspecified };
}
string VariableDeclaration::externalIdentifierHex() const
{
solAssert(isStateVariable() && isPublic(), "Can only be called for public state variables");
return TypeProvider::function(*this)->externalIdentifierHex();
}
TypePointer VariableDeclaration::type() const
{
return annotation().type;