aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityParser.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-05-30 22:45:36 +0800
committerGitHub <noreply@github.com>2017-05-30 22:45:36 +0800
commit254b55728f66ea164e9085700a294ac4837f2029 (patch)
treea4c464d4d40baaa260f071c1028f347bd287e44d /test/libsolidity/SolidityParser.cpp
parent0066a08aa8f6c469cde7947ec50ca662a32123a0 (diff)
parent89b60ffbd4c2dde26fa5e9f1d750729b5c89373e (diff)
downloaddexon-solidity-254b55728f66ea164e9085700a294ac4837f2029.tar.gz
dexon-solidity-254b55728f66ea164e9085700a294ac4837f2029.tar.zst
dexon-solidity-254b55728f66ea164e9085700a294ac4837f2029.zip
Merge pull request #2264 from roadriverrail/refactor_error_log
Refactor error reporting
Diffstat (limited to 'test/libsolidity/SolidityParser.cpp')
-rw-r--r--test/libsolidity/SolidityParser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp
index 6e33aba5..31dfada9 100644
--- a/test/libsolidity/SolidityParser.cpp
+++ b/test/libsolidity/SolidityParser.cpp
@@ -24,7 +24,7 @@
#include <memory>
#include <libsolidity/parsing/Scanner.h>
#include <libsolidity/parsing/Parser.h>
-#include <libsolidity/interface/Exceptions.h>
+#include <libsolidity/interface/ErrorReporter.h>
#include "../TestHelper.h"
#include "ErrorCheck.h"
@@ -41,7 +41,8 @@ namespace
{
ASTPointer<ContractDefinition> parseText(std::string const& _source, ErrorList& _errors)
{
- ASTPointer<SourceUnit> sourceUnit = Parser(_errors).parse(std::make_shared<Scanner>(CharStream(_source)));
+ ErrorReporter errorReporter(_errors);
+ ASTPointer<SourceUnit> sourceUnit = Parser(errorReporter).parse(std::make_shared<Scanner>(CharStream(_source)));
if (!sourceUnit)
return ASTPointer<ContractDefinition>();
for (ASTPointer<ASTNode> const& node: sourceUnit->nodes())