diff options
author | Rhett Aultman <roadriverrail@gmail.com> | 2016-12-12 06:17:38 +0800 |
---|---|---|
committer | Rhett Aultman <rhett.aultman@meraki.net> | 2017-01-17 01:32:57 +0800 |
commit | 071b936b371cd5287717d0ac27b80b837836809a (patch) | |
tree | b4aa6fc05ef1ee3ebec47d7c4ada0c2c0a14a10e /libsolidity/ast | |
parent | 9e88f1eebe27c780c80be06d702eac30e2fc5fa3 (diff) | |
download | dexon-solidity-071b936b371cd5287717d0ac27b80b837836809a.tar.gz dexon-solidity-071b936b371cd5287717d0ac27b80b837836809a.tar.zst dexon-solidity-071b936b371cd5287717d0ac27b80b837836809a.zip |
Only avoid collision if it's the same file
@chriseth had suggested that it would be better if contracts were
referenced in a file:contract notation, and that we output .bin files
that prepend original path names if necessary to avoid a collision.
This commit is mostly a draft; it still needs to be run through the test
suite.
Diffstat (limited to 'libsolidity/ast')
-rw-r--r-- | libsolidity/ast/AST.cpp | 6 | ||||
-rw-r--r-- | libsolidity/ast/AST.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp index 6f7a64dc..480fce44 100644 --- a/libsolidity/ast/AST.cpp +++ b/libsolidity/ast/AST.cpp @@ -190,6 +190,12 @@ void ContractDefinition::setUserDocumentation(Json::Value const& _userDocumentat } +std::string ContractDefinition::fullyQualifiedName() const +{ + std::string qualifiedName = *(location().sourceName) + ":" + 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 2d092408..060cf973 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -358,6 +358,8 @@ 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; |