aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-02-22 09:13:41 +0800
committerchriseth <c@ethdev.com>2016-03-30 08:37:00 +0800
commit949b00ed591303c531ed8fa73087b710b7a554de (patch)
tree182664f2545e6211d7994ef90a1e7746d5482981 /libsolidity/interface
parent8236732e9a5d2535afd3a3573a70d5aab3da3efe (diff)
downloaddexon-solidity-949b00ed591303c531ed8fa73087b710b7a554de.tar.gz
dexon-solidity-949b00ed591303c531ed8fa73087b710b7a554de.tar.zst
dexon-solidity-949b00ed591303c531ed8fa73087b710b7a554de.zip
Parsing for inline assembly.
Diffstat (limited to 'libsolidity/interface')
-rw-r--r--libsolidity/interface/SourceReferenceFormatter.cpp9
-rw-r--r--libsolidity/interface/SourceReferenceFormatter.h3
2 files changed, 6 insertions, 6 deletions
diff --git a/libsolidity/interface/SourceReferenceFormatter.cpp b/libsolidity/interface/SourceReferenceFormatter.cpp
index 169e5c18..65d7fbc8 100644
--- a/libsolidity/interface/SourceReferenceFormatter.cpp
+++ b/libsolidity/interface/SourceReferenceFormatter.cpp
@@ -21,7 +21,6 @@
*/
#include <libsolidity/interface/SourceReferenceFormatter.h>
-#include <libsolidity/interface/CompilerStack.h>
#include <libsolidity/parsing/Scanner.h>
#include <libsolidity/interface/Exceptions.h>
@@ -85,7 +84,7 @@ void SourceReferenceFormatter::printExceptionInformation(
ostream& _stream,
Exception const& _exception,
string const& _name,
- CompilerStack const& _compiler
+ function<Scanner const&(string const&)> const& _scannerFromSourceName
)
{
SourceLocation const* location = boost::get_error_info<errinfo_sourceLocation>(_exception);
@@ -94,7 +93,7 @@ void SourceReferenceFormatter::printExceptionInformation(
if (location)
{
- scannerPtr = &_compiler.scanner(*location->sourceName);
+ scannerPtr = &_scannerFromSourceName(*location->sourceName);
printSourceName(_stream, *location, *scannerPtr);
}
@@ -104,7 +103,7 @@ void SourceReferenceFormatter::printExceptionInformation(
if (location)
{
- scannerPtr = &_compiler.scanner(*location->sourceName);
+ scannerPtr = &_scannerFromSourceName(*location->sourceName);
printSourceLocation(_stream, *location, *scannerPtr);
}
@@ -112,7 +111,7 @@ void SourceReferenceFormatter::printExceptionInformation(
{
for (auto info: secondarylocation->infos)
{
- scannerPtr = &_compiler.scanner(*info.second.sourceName);
+ scannerPtr = &_scannerFromSourceName(*info.second.sourceName);
_stream << info.first << " ";
printSourceName(_stream, info.second, *scannerPtr);
_stream << endl;
diff --git a/libsolidity/interface/SourceReferenceFormatter.h b/libsolidity/interface/SourceReferenceFormatter.h
index dd258c27..1fc42753 100644
--- a/libsolidity/interface/SourceReferenceFormatter.h
+++ b/libsolidity/interface/SourceReferenceFormatter.h
@@ -23,6 +23,7 @@
#pragma once
#include <ostream>
+#include <functional>
#include <libevmasm/SourceLocation.h>
namespace dev
@@ -44,7 +45,7 @@ public:
std::ostream& _stream,
Exception const& _exception,
std::string const& _name,
- CompilerStack const& _compiler
+ std::function<Scanner const&(std::string const&)> const& _scannerFromSourceName
);
private:
static void printSourceName(std::ostream& _stream, SourceLocation const& _location, Scanner const& _scanner);