diff options
author | chriseth <chris@ethereum.org> | 2017-07-27 17:07:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-27 17:07:15 +0800 |
commit | 1298a8df14bd3dd6495aa38413208fa77781d4fd (patch) | |
tree | 90fe3173fc7716789b47474cfb4053e4b90dd752 /libsolidity/ast/AST.h | |
parent | 16ca1eea78d476de3fd52ebdd9dcfb6fa5610aa6 (diff) | |
parent | 35feb6d47ce143c625187a95f54563fa456aa3f5 (diff) | |
download | dexon-solidity-1298a8df14bd3dd6495aa38413208fa77781d4fd.tar dexon-solidity-1298a8df14bd3dd6495aa38413208fa77781d4fd.tar.gz dexon-solidity-1298a8df14bd3dd6495aa38413208fa77781d4fd.tar.bz2 dexon-solidity-1298a8df14bd3dd6495aa38413208fa77781d4fd.tar.lz dexon-solidity-1298a8df14bd3dd6495aa38413208fa77781d4fd.tar.xz dexon-solidity-1298a8df14bd3dd6495aa38413208fa77781d4fd.tar.zst dexon-solidity-1298a8df14bd3dd6495aa38413208fa77781d4fd.zip |
Merge pull request #2566 from ethereum/metadata-only-relevant
Metadata: only include relevant files in the source list
Diffstat (limited to 'libsolidity/ast/AST.h')
-rw-r--r-- | libsolidity/ast/AST.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index 81ddc754..8012bcb4 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -136,6 +136,9 @@ public: std::vector<ASTPointer<ASTNode>> nodes() const { return m_nodes; } + /// @returns a set of referenced SourceUnits. Recursively if @a _recurse is true. + std::set<SourceUnit const*> referencedSourceUnits(bool _recurse = false, std::set<SourceUnit const*> _skipList = std::set<SourceUnit const*>()) const; + private: std::vector<ASTPointer<ASTNode>> m_nodes; }; @@ -168,6 +171,9 @@ public: ASTNode const* scope() const { return m_scope; } void setScope(ASTNode const* _scope) { m_scope = _scope; } + /// @returns the source unit this declaration is present in. + SourceUnit const& sourceUnit() const; + /// @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; |