aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerStack.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-05-20 06:27:07 +0800
committerchriseth <c@ethdev.com>2015-05-20 06:28:15 +0800
commit2be64c702609df67903fd89c42cf632d71aad6fd (patch)
treeceb573ff287d81f47d75acbf8481eab631aa8081 /CompilerStack.h
parent70d9eb3f1d1e16757c8f9b66669cd0f38d7bfef7 (diff)
downloaddexon-solidity-2be64c702609df67903fd89c42cf632d71aad6fd.tar.gz
dexon-solidity-2be64c702609df67903fd89c42cf632d71aad6fd.tar.zst
dexon-solidity-2be64c702609df67903fd89c42cf632d71aad6fd.zip
Gas estimation taking known state into account.
Diffstat (limited to 'CompilerStack.h')
-rw-r--r--CompilerStack.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/CompilerStack.h b/CompilerStack.h
index 2ad791f2..0bc109a2 100644
--- a/CompilerStack.h
+++ b/CompilerStack.h
@@ -72,6 +72,9 @@ public:
/// Creates a new compiler stack. Adds standard sources if @a _addStandardSources.
explicit CompilerStack(bool _addStandardSources = true);
+ /// Resets the compiler to a state where the sources are not parsed or even removed.
+ void reset(bool _keepSources = false, bool _addStandardSources = true);
+
/// 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.
void addSources(StringMap const& _nameContents, bool _isLibrary = false) { for (auto const& i: _nameContents) addSource(i.first, i.second, _isLibrary); }
@@ -165,13 +168,11 @@ private:
Contract();
};
- void reset(bool _keepSources = false);
void resolveImports();
Contract const& getContract(std::string const& _contractName = "") const;
Source const& getSource(std::string const& _sourceName = "") const;
- bool m_addStandardSources; ///< If true, standard sources are added.
bool m_parseSuccessful;
std::map<std::string const, Source> m_sources;
std::shared_ptr<GlobalContext> m_globalContext;