From 22eff22492b2d569fe56b59763ddc1cd1cf9ccf4 Mon Sep 17 00:00:00 2001 From: Christian Parpart Date: Wed, 28 Nov 2018 16:13:36 +0100 Subject: liblangutil: extends CharStream to know about the respective (file-)name (and adapt codebase to it) --- test/libyul/Common.cpp | 2 +- test/libyul/Parser.cpp | 2 +- test/libyul/YulOptimizerTest.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test/libyul') diff --git a/test/libyul/Common.cpp b/test/libyul/Common.cpp index 2e70d086..36065db7 100644 --- a/test/libyul/Common.cpp +++ b/test/libyul/Common.cpp @@ -57,7 +57,7 @@ pair, shared_ptr> yul::test::parse(strin auto flavour = _yul ? yul::AsmFlavour::Yul : yul::AsmFlavour::Strict; ErrorList errors; ErrorReporter errorReporter(errors); - auto scanner = make_shared(CharStream(_source), ""); + auto scanner = make_shared(CharStream(_source, ""), ""); auto parserResult = yul::Parser(errorReporter, flavour).parse(scanner, false); if (parserResult) { diff --git a/test/libyul/Parser.cpp b/test/libyul/Parser.cpp index 6f946362..caaf2719 100644 --- a/test/libyul/Parser.cpp +++ b/test/libyul/Parser.cpp @@ -51,7 +51,7 @@ bool parse(string const& _source, ErrorReporter& errorReporter) { try { - auto scanner = make_shared(CharStream(_source)); + auto scanner = make_shared(CharStream(_source, "")); auto parserResult = yul::Parser(errorReporter, yul::AsmFlavour::Yul).parse(scanner, false); if (parserResult) { diff --git a/test/libyul/YulOptimizerTest.cpp b/test/libyul/YulOptimizerTest.cpp index c857d8a5..8f282aac 100644 --- a/test/libyul/YulOptimizerTest.cpp +++ b/test/libyul/YulOptimizerTest.cpp @@ -259,7 +259,7 @@ bool YulOptimizerTest::parse(ostream& _stream, string const& _linePrefix, bool c yul::AsmFlavour flavour = m_yul ? yul::AsmFlavour::Yul : yul::AsmFlavour::Strict; ErrorList errors; ErrorReporter errorReporter(errors); - shared_ptr scanner = make_shared(CharStream(m_source), ""); + shared_ptr scanner = make_shared(CharStream(m_source, ""), ""); m_ast = yul::Parser(errorReporter, flavour).parse(scanner, false); if (!m_ast || !errorReporter.errors().empty()) { -- cgit v1.2.3