diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-28 23:27:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-28 23:27:10 +0800 |
commit | ab06346e6ec645ed3ec709aa18169633207a1c02 (patch) | |
tree | 345585d5fb7d8f780fcc11dffa770c09e71ab052 | |
parent | 1beef3836187fd92499aad80693dc6beb1d3a36f (diff) | |
parent | ceba40c410784431b8e7a8a945e7a3150c7bf5b3 (diff) | |
download | dexon-solidity-ab06346e6ec645ed3ec709aa18169633207a1c02.tar.gz dexon-solidity-ab06346e6ec645ed3ec709aa18169633207a1c02.tar.zst dexon-solidity-ab06346e6ec645ed3ec709aa18169633207a1c02.zip |
Merge pull request #2835 from ethereum/compilerstack-docs
Reorder some methods in CompilerStack for readability
-rw-r--r-- | libsolidity/interface/CompilerStack.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index 361b8a45..2756e57d 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -116,6 +116,9 @@ public: m_optimizeRuns = _runs; } + /// @arg _metadataLiteralSources When true, store sources as literals in the contract metadata. + void useMetadataLiteralSources(bool _metadataLiteralSources) { m_metadataLiteralSources = _metadataLiteralSources; } + /// Adds a source object (e.g. file) to the parser. After this, parse has to be called again. /// @returns true if a source object by the name already existed and was replaced. bool addSource(std::string const& _name, std::string const& _content, bool _isLibrary = false); @@ -125,7 +128,7 @@ public: bool parse(); /// Performs the analysis steps (imports, scopesetting, syntaxCheck, referenceResolving, - /// typechecking, staticAnalysis) on previously set sources + /// typechecking, staticAnalysis) on previously parsed sources. /// @returns false on error. bool analyze(); @@ -133,9 +136,6 @@ public: /// @returns false on error. bool parseAndAnalyze(); - /// @returns a list of the contract names in the sources. - std::vector<std::string> contractNames() const; - /// Compiles the source units that were previously added and parsed. /// @returns false on error. bool compile(); @@ -158,6 +158,9 @@ public: /// start line, start column, end line, end column std::tuple<int, int, int, int> positionFromSourceLocation(SourceLocation const& _sourceLocation) const; + /// @returns a list of the contract names in the sources. + std::vector<std::string> contractNames() const; + /// @returns either the contract's name or a mixture of its name and source file, sanitized for filesystem use std::string const filesystemFriendlyName(std::string const& _contractName) const; @@ -210,7 +213,6 @@ public: /// @returns the Contract Metadata std::string const& metadata(std::string const& _contractName) const; - void useMetadataLiteralSources(bool _metadataLiteralSources) { m_metadataLiteralSources = _metadataLiteralSources; } /// @returns a JSON representing the estimated gas usage for contract creation, internal and external functions Json::Value gasEstimates(std::string const& _contractName) const; |