aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/Common.cpp
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-11-21 19:42:34 +0800
committerChristian Parpart <christian@ethereum.org>2018-11-23 21:29:00 +0800
commitec47c8946ba5f78563b7eca2512b3cee68db45b4 (patch)
tree58216cdbf00dba9a61135d85b289ce2af9fc2974 /test/libyul/Common.cpp
parent3734f40d315439f8a791967a6adfda8cf9fd1e55 (diff)
downloaddexon-solidity-ec47c8946ba5f78563b7eca2512b3cee68db45b4.tar.gz
dexon-solidity-ec47c8946ba5f78563b7eca2512b3cee68db45b4.tar.zst
dexon-solidity-ec47c8946ba5f78563b7eca2512b3cee68db45b4.zip
Isolating libyul library API into its own namespace `yul`.
Diffstat (limited to 'test/libyul/Common.cpp')
-rw-r--r--test/libyul/Common.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/libyul/Common.cpp b/test/libyul/Common.cpp
index 5851555a..d7785287 100644
--- a/test/libyul/Common.cpp
+++ b/test/libyul/Common.cpp
@@ -37,10 +37,10 @@
using namespace std;
using namespace langutil;
-using namespace dev::yul;
+using namespace yul;
using namespace dev::solidity;
-void dev::yul::test::printErrors(ErrorList const& _errors, Scanner const& _scanner)
+void yul::test::printErrors(ErrorList const& _errors, Scanner const& _scanner)
{
SourceReferenceFormatter formatter(cout, [&](std::string const&) -> Scanner const& { return _scanner; });
@@ -52,18 +52,18 @@ void dev::yul::test::printErrors(ErrorList const& _errors, Scanner const& _scann
}
-pair<shared_ptr<Block>, shared_ptr<assembly::AsmAnalysisInfo>> dev::yul::test::parse(string const& _source, bool _yul)
+pair<shared_ptr<Block>, shared_ptr<yul::AsmAnalysisInfo>> yul::test::parse(string const& _source, bool _yul)
{
- auto flavour = _yul ? assembly::AsmFlavour::Yul : assembly::AsmFlavour::Strict;
+ auto flavour = _yul ? yul::AsmFlavour::Yul : yul::AsmFlavour::Strict;
ErrorList errors;
ErrorReporter errorReporter(errors);
auto scanner = make_shared<Scanner>(CharStream(_source), "");
- auto parserResult = assembly::Parser(errorReporter, flavour).parse(scanner, false);
+ auto parserResult = yul::Parser(errorReporter, flavour).parse(scanner, false);
if (parserResult)
{
BOOST_REQUIRE(errorReporter.errors().empty());
- auto analysisInfo = make_shared<assembly::AsmAnalysisInfo>();
- assembly::AsmAnalyzer analyzer(
+ auto analysisInfo = make_shared<yul::AsmAnalysisInfo>();
+ yul::AsmAnalyzer analyzer(
*analysisInfo,
errorReporter,
dev::test::Options::get().evmVersion(),
@@ -83,13 +83,13 @@ pair<shared_ptr<Block>, shared_ptr<assembly::AsmAnalysisInfo>> dev::yul::test::p
return {};
}
-assembly::Block dev::yul::test::disambiguate(string const& _source, bool _yul)
+yul::Block yul::test::disambiguate(string const& _source, bool _yul)
{
auto result = parse(_source, _yul);
return boost::get<Block>(Disambiguator(*result.second, {})(*result.first));
}
-string dev::yul::test::format(string const& _source, bool _yul)
+string yul::test::format(string const& _source, bool _yul)
{
- return assembly::AsmPrinter(_yul)(*parse(_source, _yul).first);
+ return yul::AsmPrinter(_yul)(*parse(_source, _yul).first);
}