diff options
author | Liana Husikyan <liana@ethdev.com> | 2015-05-07 19:32:26 +0800 |
---|---|---|
committer | Liana Husikyan <liana@ethdev.com> | 2015-05-07 19:33:27 +0800 |
commit | 83c504ec89965fe87d502cd945b4c6656c8d7703 (patch) | |
tree | 8f0eb7a51edadaf3e2ee1bbe916d4a2f09f69fd7 /CompilerStack.h | |
parent | 5d2c36603fec5e1027a7bc1666a87cc9aed45bd0 (diff) | |
download | dexon-solidity-83c504ec89965fe87d502cd945b4c6656c8d7703.tar.gz dexon-solidity-83c504ec89965fe87d502cd945b4c6656c8d7703.tar.zst dexon-solidity-83c504ec89965fe87d502cd945b4c6656c8d7703.zip |
added interface function for SourceLocation/ position convertation to compilerstack
Diffstat (limited to 'CompilerStack.h')
-rw-r--r-- | CompilerStack.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CompilerStack.h b/CompilerStack.h index 7d919862..3eff7577 100644 --- a/CompilerStack.h +++ b/CompilerStack.h @@ -31,6 +31,7 @@ #include <json/json.h> #include <libdevcore/Common.h> #include <libdevcore/FixedHash.h> +#include <libevmasm/SourceLocation.h> namespace dev { @@ -131,6 +132,9 @@ public: /// scanning the source code - this is useful for printing exception information. static bytes staticCompile(std::string const& _sourceCode, bool _optimize = false); + /// helper function for printing logs. Do only use in error cases, it's quite expensive. + std::pair<int, int> positionFromSourceLocation(SourceLocation const& _sourceLocation) const; + private: /** * Information pertaining to one source unit, filled gradually during parsing and compilation. |