diff options
author | Rhett Aultman <roadriverrail@gmail.com> | 2016-12-16 20:52:19 +0800 |
---|---|---|
committer | Rhett Aultman <rhett.aultman@meraki.net> | 2017-01-17 01:32:57 +0800 |
commit | f10bf36ae3681169be7c75dac32567f1746c529d (patch) | |
tree | dff4b285b07c980c51599398940cb8a7679324bd | |
parent | 0c98e4b2da6b5de885114a744339a1f0f96c79be (diff) | |
download | dexon-solidity-f10bf36ae3681169be7c75dac32567f1746c529d.tar.gz dexon-solidity-f10bf36ae3681169be7c75dac32567f1746c529d.tar.zst dexon-solidity-f10bf36ae3681169be7c75dac32567f1746c529d.zip |
Move fullyQualified() name to Declaration
-rw-r--r-- | libsolidity/ast/AST.cpp | 8 | ||||
-rw-r--r-- | libsolidity/ast/AST.h | 3 |
2 files changed, 1 insertions, 10 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp index 45ff69c5..dd582e54 100644 --- a/libsolidity/ast/AST.cpp +++ b/libsolidity/ast/AST.cpp @@ -189,14 +189,6 @@ void ContractDefinition::setUserDocumentation(Json::Value const& _userDocumentat m_userDocumentation = _userDocumentation; } - -string ContractDefinition::fullyQualifiedName() const -{ - std::string sourceString = *(location().sourceName); - std::string qualifiedName = (sourceString.empty() ? ("") : (sourceString + ":")) + name(); - return qualifiedName; -} - vector<Declaration const*> const& ContractDefinition::inheritableMembers() const { if (!m_inheritableMembers) diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index 060cf973..f72b272c 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -161,6 +161,7 @@ public: /// @returns the source name this declaration is present in. /// Can be combined with annotation().canonicalName to form a globally unique name. std::string sourceUnitName() const; + std::string fullyQualifiedName() const { return sourceUnitName() + ":" + name(); } virtual bool isLValue() const { return false; } virtual bool isPartOfExternalInterface() const { return false; } @@ -358,8 +359,6 @@ public: Json::Value const& devDocumentation() const; void setDevDocumentation(Json::Value const& _devDocumentation); - std::string fullyQualifiedName() const; - virtual TypePointer type() const override; virtual ContractDefinitionAnnotation& annotation() const override; |