diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index e8ab7c8c9..49014427e 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -251,6 +251,10 @@ public: /// @returns the parsed source unit with the supplied name. SourceUnit const& ast(std::string const& _sourceName) const; + /// @returns the parsed contract with the supplied name. Throws an exception if the contract + /// does not exist. + ContractDefinition const& contractDefinition(std::string const& _contractName) const; + /// Helper function for logs printing. Do only use in error cases, it's quite expensive. /// line and columns are numbered starting from 1 with following order: /// start line, start column, end line, end column @@ -442,10 +446,6 @@ private: /// Can only be called after state is SourcesSet. Source const& source(std::string const& _sourceName) const; - /// @returns the parsed contract with the supplied name. Throws an exception if the contract - /// does not exist. - ContractDefinition const& contractDefinition(std::string const& _contractName) const; - /// @returns the metadata JSON as a compact string for the given contract. std::string createMetadata(Contract const& _contract) const;